PipeWire 1.2.7
|
String handling utilities More...
Files | |
file | string.h |
spa/utils/string.h | |
Data Structures | |
struct | spa_strbuf |
Functions | |
static bool | spa_streq (const char *s1, const char *s2) |
static bool | spa_strneq (const char *s1, const char *s2, size_t len) |
static bool | spa_strstartswith (const char *s, const char *prefix) |
static bool | spa_strendswith (const char *s, const char *suffix) |
static bool | spa_atoi32 (const char *str, int32_t *val, int base) |
Convert str to an int32_t with the given base and store the result in val. | |
static bool | spa_atou32 (const char *str, uint32_t *val, int base) |
Convert str to an uint32_t with the given base and store the result in val. | |
static bool | spa_atoi64 (const char *str, int64_t *val, int base) |
Convert str to an int64_t with the given base and store the result in val. | |
static bool | spa_atou64 (const char *str, uint64_t *val, int base) |
Convert str to an uint64_t with the given base and store the result in val. | |
static bool | spa_atob (const char *str) |
Convert str to a boolean. | |
static int | spa_vscnprintf (char *buffer, size_t size, const char *format, va_list args) |
static int | spa_scnprintf (char *buffer, size_t size, const char *format,...) |
static float | spa_strtof (const char *str, char **endptr) |
Convert str to a float in the C locale. | |
static bool | spa_atof (const char *str, float *val) |
Convert str to a float and store the result in val. | |
static double | spa_strtod (const char *str, char **endptr) |
Convert str to a double in the C locale. | |
static bool | spa_atod (const char *str, double *val) |
Convert str to a double and store the result in val. | |
static char * | spa_dtoa (char *str, size_t size, double val) |
static void | spa_strbuf_init (struct spa_strbuf *buf, char *buffer, size_t maxsize) |
static int | spa_strbuf_append (struct spa_strbuf *buf, const char *fmt,...) |
String handling utilities
|
inlinestatic |
If both a and b are NULL, the two are considered equal.
|
inlinestatic |
If both a and b are NULL, the two are considered equal.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Convert str to an int32_t with the given base and store the result in val.
On failure, the value of val is unmodified.
|
inlinestatic |
Convert str to an uint32_t with the given base and store the result in val.
On failure, the value of val is unmodified.
|
inlinestatic |
Convert str to an int64_t with the given base and store the result in val.
On failure, the value of val is unmodified.
|
inlinestatic |
Convert str to an uint64_t with the given base and store the result in val.
On failure, the value of val is unmodified.
|
inlinestatic |
Convert str to a boolean.
Allowed boolean values are "true" and a literal "1", anything else is false.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Convert str to a float in the C locale.
If endptr is not NULL, a pointer to the character after the last character used in the conversion is stored in the location referenced by endptr.
|
inlinestatic |
Convert str to a float and store the result in val.
On failure, the value of val is unmodified.
|
inlinestatic |
Convert str to a double in the C locale.
If endptr is not NULL, a pointer to the character after the last character used in the conversion is stored in the location referenced by endptr.
|
inlinestatic |
Convert str to a double and store the result in val.
On failure, the value of val is unmodified.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |