|
myMPD
Internal API documentation
|
Array functions for sds strings. More...
#include "dist/sds/sds.h"#include <stdbool.h>

Go to the source code of this file.
Data Structures | |
| struct | t_sds_array |
Enumerations | |
| enum | { SDS_ARRAY_START_CAPACITY = 16 } |
Functions | |
| struct t_sds_array * | sds_array_new (void) |
| void | sds_array_init (struct t_sds_array *array) |
| void | sds_array_clear (struct t_sds_array *array) |
| void | sds_array_free (struct t_sds_array *array) |
| bool | sds_array_push (struct t_sds_array *array, sds s) |
| bool | sds_array_shuffle (struct t_sds_array *array) |
| bool | sds_array_sort (struct t_sds_array *array, bool desc) |
Array functions for sds strings.
| void sds_array_clear | ( | struct t_sds_array * | array | ) |
Clears the sds array, freeing all sds strings
| array | Pointer to the sds array to clear |
| void sds_array_free | ( | struct t_sds_array * | array | ) |
Frees the sds array and all its contents
| array | Pointer to the sds array to free |
| void sds_array_init | ( | struct t_sds_array * | array | ) |
Initializes an existing sds array
| array | Pointer to the sds array to initialize |
| struct t_sds_array * sds_array_new | ( | void | ) |
Creates and initializes a new sds array
| bool sds_array_push | ( | struct t_sds_array * | array, |
| sds | s ) |
Pushes the sds string to the array
| array | Pointer to the sds array |
| s | Pointer of sds string to push (this function does not copy it) |
| bool sds_array_shuffle | ( | struct t_sds_array * | array | ) |
Shuffles the sds array using the Fisher-Yates algorithm
| array | Pointer to the sds array |
| bool sds_array_sort | ( | struct t_sds_array * | array, |
| bool | desc ) |
Sorts the sds array utf8 aware and case insensitive using qsort
| array | Pointer to the sds array |
| desc | If true, sorts in descending order; otherwise, sorts in ascending order |