|
| int | _free_nstr (N_STR **ptr) |
| | free a N_STR and set the pointer to NULL
|
| N_STR * | char_to_nstr (const char *src) |
| | convert a char into a N_STR, shorter version
|
| int | char_to_nstr_ex (const char *from, NSTRBYTE nboct, N_STR **to) |
| | convert a char into a N_STR
|
| N_STR * | char_to_nstr_nocopy (char *src) |
| | convert a char into a N_STR without copying, shorter version
|
| int | char_to_nstr_nocopy_ex (char *from, NSTRBYTE nboct, N_STR **to) |
| | convert a char into a N_STR without copying
|
| int | empty_nstr (N_STR *nstr) |
| | reinitialize a nstr
|
| N_STR * | file_to_nstr (char *filename) |
| | load a whole file into a N_STR
|
| int | free_nstr_nolog (N_STR **ptr) |
| | free a N_STR and set to NULL without logging
|
| void | free_nstr_ptr (void *ptr) |
| | free a N_STR without setting the pointer to NULL
|
| void | free_nstr_ptr_nolog (void *ptr) |
| | free a N_STR without logging or setting to NULL
|
| int | free_split_result (char ***tab) |
| | free a char **tab and set it to NULL
|
| char * | join (char **splitresult, const char *delim) |
| | join a split result into a string
|
| N_STR * | n_str_template_expand (const char *tmpl, struct HASH_TABLE *vars) |
| | Expand double-brace tokens in a template using a hash table.
|
| N_STR * | n_str_url_encode (const char *src) |
| | Percent-encode a string per RFC 3986 (unreserved chars kept).
|
| int | n_str_utf8_valid (const char *s, size_t len) |
| | Test that [s, s+len) is well-formed UTF-8 (RFC 3629).
|
| N_STR * | new_nstr (NSTRBYTE size) |
| | create a new string
|
| char * | nfgets (char *buffer, NSTRBYTE size, FILE *stream) |
| | N_STR wrapper around fgets.
|
| int | nstr_to_fd (N_STR *str, FILE *out, int lock) |
| | write a whole N_STR into an open file descriptor
|
| int | nstr_to_file (N_STR *n_str, char *filename) |
| | write a whole N_STR into a file
|
| N_STR * | nstrcat_bytes_ex (N_STR **dest, void *src, NSTRBYTE size) |
| | wrapper to nstrcat_ex to concatenate void *data
|
| N_STR * | nstrcat_ex (N_STR **dest, void *src, NSTRBYTE size, int resize_flag) |
| | concatenate data inside a N_STR
|
| N_STR * | nstrdup (N_STR *msg) |
| | make a copy of a N_STR
|
| N_STR * | nstrprintf_cat_ex (N_STR **nstr_var, const char *format,...) |
| | concatenate printf on a N_STR
|
| N_STR * | nstrprintf_ex (N_STR **nstr_var, const char *format,...) |
| | printf on a N_STR
|
| int | resize_nstr (N_STR *nstr, size_t size) |
| | resize a N_STR
|
| int | scan_dir (const char *dir, LIST *result, const int recurse) |
| | get a list of files in a directory
|
| int | scan_dir_ex (const char *dir, const char *pattern, LIST *result, const int recurse, const int mode) |
| | get a list of files in a directory, extended N_STR version
|
| int | skipu (const char *string, char toskip, NSTRBYTE *iterator, int inc) |
| | skip characters in string until string[iterator] == toskip
|
| int | skipw (const char *string, char toskip, NSTRBYTE *iterator, int inc) |
| | skip characters in string while string[iterator] == toskip
|
| char ** | split (const char *str, const char *delim, int empty) |
| | return an array of char pointers to the split sections
|
| int | split_count (char **split_result) |
| | count split elements
|
| int | str_natcasecmp (const char *a, const char *b) |
| | compare two strings in natural order, ignoring ASCII case
|
| int | str_natncasecmp (const char *a, size_t alen, const char *b, size_t blen) |
| | compare two byte runs of known length in natural order, ignoring ASCII case
|
| char * | str_replace (const char *string, const char *substr, const char *replacement) |
| | return a new string with all occurrences of substr replaced
|
| int | str_sanitize (char *string, const char *mask, const char replacement) |
| | in-place substitution of a set of chars by a single one
|
| int | str_sanitize_ex (char *string, const NSTRBYTE string_len, const char *mask, const NSTRBYTE masklen, const char replacement) |
| | sanitize a string using a character mask
|
| int | str_to_int (const char *s, int *i, const int base) |
| | string to integer, shorter version
|
| int | str_to_int_ex (const char *s, NSTRBYTE start, NSTRBYTE end, int *i, const int base) |
| | string to integer, with error checking
|
| int | str_to_int_nolog (const char *s, NSTRBYTE start, NSTRBYTE end, int *i, const int base, N_STR **infos) |
| | string to integer, with error checking and no logging
|
| int | str_to_long (const char *s, long int *i, const int base) |
| | string to long integer, shorter version
|
| int | str_to_long_ex (const char *s, NSTRBYTE start, NSTRBYTE end, long int *i, const int base) |
| | string to long integer, with error checking
|
| int | str_to_long_long (const char *s, long long int *i, const int base) |
| | string to long long integer, shorter version
|
| int | str_to_long_long_ex (const char *s, NSTRBYTE start, NSTRBYTE end, long long int *i, const int base) |
| | string to long long integer, with error checking
|
| int | strcpy_u (const char *from, char *to, NSTRBYTE to_size, char delim, NSTRBYTE *it) |
| | copy from string to dest until from[iterator] == delim
|
| int | strlo (const char *string, char *dest) |
| | lower case a string
|
| int | strup (const char *string, char *dest) |
| | upper case a string
|
| char * | trim (const char *s) |
| | trim and put a \0 at the end, return new char *
|
| char * | trim_nocopy (char *s) |
| | trim and put a \0 at the end, return new begin pointer
|
| int | wildmat (register const char *text, register const char *p) |
| | pattern matching
|
| int | wildmatcase (register const char *text, register const char *p) |
| | pattern matching, case insensitive
|
| int | write_and_fit (char **dest, NSTRBYTE *size, NSTRBYTE *written, const char *src) |
| | write and fit into the char array
|
| int | write_and_fit_ex (char **dest, NSTRBYTE *size, NSTRBYTE *written, const char *src, NSTRBYTE src_size, NSTRBYTE additional_padding) |
| | write and fit bytes into a dynamically sized buffer
|
N_STR and string function declaration.
- Author
- Castagnier Mickael
- Version
- 2.0
- Date
- 05/02/14
Definition in file n_str.h.