|
myMPD
Internal API documentation
|
Extra functions for sds strings. More...
#include "src/lib/sds/sds_extras.h"#include "dist/sds/sds.h"#include <inttypes.h>#include <string.h>
Functions | |
| void | sds_merge_lines (sds s) |
| sds * | sds_split_comma_trim (const char *p, int *count) |
| sds | sds_catchar (sds s, const char c) |
| sds | sds_replacelen (sds s, const char *p, size_t len) |
| sds | sds_replace (sds s, const char *p) |
| sds | sds_catbool (sds s, bool v) |
| sds | sds_pad_int (int64_t value, sds buffer) |
| void | sds_free_void (void *p) |
Extra functions for sds strings.
| sds sds_catbool | ( | sds | s, |
| bool | v ) |
Converts a bool value to a sds string
| s | string to append the value |
| v | bool value to convert |
| sds sds_catchar | ( | sds | s, |
| const char | c ) |
Appends a char to sds string s, this is faster than using sdscatfmt
| s | sds string |
| c | char to append |
| void sds_free_void | ( | void * | p | ) |
Frees an sds string pointed by void pointer
| p | Void pointer to sds string |
| void sds_merge_lines | ( | sds | s | ) |
Removes newline characters from a string in-place.
| s | String to merge the lines |
| sds sds_pad_int | ( | int64_t | value, |
| sds | buffer ) |
Prints a zero padded value
| value | mpd song struct |
| buffer | already allocated sds string to append |
| sds sds_replace | ( | sds | s, |
| const char * | p ) |
Replaces a sds string with a new value, allocates the string if it is NULL
| s | sds string to replace |
| p | replacement string |
| sds sds_replacelen | ( | sds | s, |
| const char * | p, | ||
| size_t | len ) |
Replaces a sds string with a new value, allocates the string if it is NULL
| s | sds string to replace |
| p | replacement string |
| len | replacement string length |
| sds * sds_split_comma_trim | ( | const char * | p, |
| int * | count ) |
Splits a comma separated string and trims whitespaces from single values
| p | string to split |
| count | pointer to int representing the count of values |