ecoli_string(3)
π ecoli_string π
okay so bestie, welcome to ecoli_string from the Library Functions Manual β it's the string manipulation page and honestly? it's giving utility queen. everything you need to poke, prod, compare, split and parse strings lives here. let's get into it π«Ά
πΈ NAME πΈ
ecoli_string β String manipulation
- Helpers for strings manipulation. (yes that's the whole vibe, she's a helper girlie β¨)
β¨ SYNOPSIS β¨
Functions
size_t ec_strcmp_count (const char *s1, const char *s2)
int ec_str_startswith (const char *s, const char *beginning)
int ec_asprintf (char **buf, const char *fmt,...)
int ec_vasprintf (char **buf, const char *fmt, va_list ap)
bool ec_str_is_space (const char *s)
int ec_str_parse_llint (const char *str, unsigned int base, int64_t min,
int64_t max, int64_t *val)
int ec_str_parse_ullint (const char *str, unsigned int base, uint64_t
min, uint64_t max, uint64_t *val)
π¦ Detailed Description π¦
Helpers for strings manipulation. that's it, that's the whole mission statement, and she ate π
π Function Documentation π
size_t ec_strcmp_count (const char * s1, const char * s2)
count the number of identical chars at the beginning of 2 strings. like how long do these two besties walk in the same direction before they have to part ways π
int ec_str_startswith (const char * s, const char * beginning)
return 1 if 's' starts with 'beginning'. simple. iconic. no notes.
int ec_asprintf (char ** buf, const char * fmt, ...)
like asprintf, but use libecoli allocator. same energy, different memory plug π
int ec_vasprintf (char ** buf, const char * fmt, va_list ap)
like vasprintf, but use libecoli allocator. the va_list sibling of the one above, matching outfits obviously π
bool ec_str_is_space (const char * s)
return true if string is only composed of spaces (' ', '
not me leaving this one exactly as it landed β the source text literally cuts off mid-list right there, bestie π the docstring ends after that second quote and we're not about to invent the rest. periodt.
int ec_str_parse_llint (const char * str, unsigned int base, int64_t min, int64_t max, int64_t * val)
Parse a string for a signed integer.
Parameters
strβ The string to parse.baseβ The base (0means "guess").minβ The minimum allowed value.maxβ The maximum allowed value.valβ The pointer to the value to be set on success.
Returns
On success, return 0. Else, return -1 and set errno. no cap, that errno thing matters π
int ec_str_parse_ullint (const char * str, unsigned int base, uint64_t min, uint64_t max, uint64_t * val)
Parse a string for an unsigned integer.
Parameters
strβ The string to parse.baseβ The base (0means "guess").minβ The minimum allowed value.maxβ The maximum allowed value.valβ The pointer to the value to be set on success.
Returns
On success, return 0. Else, return -1 and set errno. same rules, same drama, just unsigned this time π
π Author π
Generated automatically by Doxygen for Libecoli from the source code. (the robots wrote it, we just made it cute β¨)
π and that's the whole page, bestie! this one shipped as part of Libecoli, Version 0.6.0 β so go forth and manipulate some strings responsibly. mwah πππ¦LibecoliβVersion 0.6.0πΈ
π¦ where this page comes from
- fedora 43: libecoli-devel 0.6.0-1.fc43 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 43: libecoli-devel 0.6.0-1.fc43 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms