ecoli_string - Man Page

Name

ecoli_string — String manipulation

— Helpers for strings manipulation.  

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.

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

int ec_str_startswith (const char * s, const char * beginning)

return 1 if 's' starts with 'beginning'

int ec_asprintf (char ** buf, const char * fmt,  ...)

like asprintf, but use libecoli allocator

int ec_vasprintf (char ** buf, const char * fmt, va_list ap)

like vasprintf, but use libecoli allocator

bool ec_str_is_space (const char * s)

return true if string is only composed of spaces (' ', '

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 (0 means '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.

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 (0 means '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.

Author

Generated automatically by Doxygen for Libecoli from the source code.

Referenced By

The man pages ec_asprintf(3), ec_strcmp_count(3), ec_str_is_space(3), ec_str_parse_llint(3), ec_str_parse_ullint(3), ec_str_startswith(3) and ec_vasprintf(3) are aliases of ecoli_string(3).

Version 0.3.0 Libecoli