|
| static int | amxc_string_realloc (amxc_string_t *string, const size_t length) |
| |
| static const char * | s_get_format_placeholder (const char *input) |
| |
| int | amxc_string_new (amxc_string_t **string, const size_t length) |
| | Allocates a string. More...
|
| |
| void | amxc_string_delete (amxc_string_t **string) |
| | Frees the previously allocated string. More...
|
| |
| int | amxc_string_init (amxc_string_t *const string, const size_t length) |
| | Initializes a string. More...
|
| |
| void | amxc_string_clean (amxc_string_t *const string) |
| | Frees the string buffer and reset length attributes. More...
|
| |
| void | amxc_string_reset (amxc_string_t *const string) |
| | Resets the buffer, reset the content to all 0. More...
|
| |
| int | amxc_string_copy (amxc_string_t *const dest, const amxc_string_t *const src) |
| | Copies the content. More...
|
| |
| int | amxc_string_grow (amxc_string_t *const string, const size_t length) |
| | Grows the string buffer. More...
|
| |
| int | amxc_string_shrink (amxc_string_t *const string, const size_t length) |
| | Shrinks the string buffer. More...
|
| |
| int | amxc_string_set_at (amxc_string_t *const string, const size_t pos, const char *const text, const size_t length, const amxc_string_flags_t flags) |
| | Set text in the string buffer at a certain position. More...
|
| |
| int | amxc_string_remove_at (amxc_string_t *const string, const size_t pos, size_t length) |
| | Removes part of the text in the string buffer. More...
|
| |
| const char * | amxc_string_get (const amxc_string_t *const string, const size_t offset) |
| | Gets the content of the string buffer. More...
|
| |
| char * | amxc_string_take_buffer (amxc_string_t *const string) |
| | Takes the string buffer. More...
|
| |
| int | amxc_string_push_buffer (amxc_string_t *const string, char *buffer, size_t length) |
| | Sets the string buffer. More...
|
| |
| char * | amxc_string_dup (const amxc_string_t *const string, const size_t start, size_t length) |
| | Creates a full or partial copy of the text in the string buffer. More...
|
| |
| void | amxc_string_triml (amxc_string_t *const string, amxc_string_is_char_fn_t fn) |
| | Trim left. More...
|
| |
| void | amxc_string_trimr (amxc_string_t *const string, amxc_string_is_char_fn_t fn) |
| | Trim right. More...
|
| |
| void | amxc_string_trim (amxc_string_t *const string, amxc_string_is_char_fn_t fn) |
| | Trim. More...
|
| |
| int | amxc_string_vsetf (amxc_string_t *const string, const char *fmt, va_list args) |
| | Sets the content of the string using printf like formatting. More...
|
| |
| int | amxc_string_setf (amxc_string_t *const string, const char *fmt,...) |
| |
| int | amxc_string_vsetf_checked (amxc_string_t *const string, amxc_string_is_safe_cb_t is_safe_cb, const char *fmt, va_list args) |
| | va_list version of amxc_string_setf_checked More...
|
| |
| int | amxc_string_setf_checked (amxc_string_t *target_string, amxc_string_is_safe_cb_t is_safe_cb, const char *fmt,...) |
| |
| int | amxc_string_vappendf (amxc_string_t *const string, const char *fmt, va_list args) |
| | Appends a formatted string to a string. More...
|
| |
| int | amxc_string_appendf (amxc_string_t *const string, const char *fmt,...) |
| |
| static bool | s_replace_percentage (amxc_string_t *string, const char *actual_placeholder, int *status) |
| |
| int | amxc_string_vappendf_checked (amxc_string_t *string, amxc_string_is_safe_cb_t is_safe_cb, const char *fmt, va_list args) |
| | va_list version of amxc_string_appendf_checked More...
|
| |
| int | amxc_string_appendf_checked (amxc_string_t *target_string, amxc_string_is_safe_cb_t is_safe_cb, const char *fmt,...) |
| |
| int | amxc_string_vprependf (amxc_string_t *const string, const char *fmt, va_list args) |
| | Prepends a formatted string to a string. More...
|
| |
| int | amxc_string_prependf (amxc_string_t *const string, const char *fmt,...) |
| |
| bool | amxc_string_is_numeric (const amxc_string_t *const string) |
| | Checks if a string is fully numeric. More...
|
| |
| int | amxc_string_search (const amxc_string_t *const string, const char *needle, uint32_t start_pos) |
| | Searches a sub-string in a string. More...
|
| |
| int | amxc_string_replace (amxc_string_t *const string, const char *needle, const char *newstr, uint32_t max) |
| | Replaces a number of sub-string occurrences in a string. More...
|
| |
| size_t | amxc_string_set (amxc_string_t *const string, const char *data) |
| | Sets a 0 terminated string in the string buffer. More...
|
| |
| int | amxc_string_to_upper (amxc_string_t *const string) |
| | Converts all lower case characters to upper case. More...
|
| |
| int | amxc_string_to_lower (amxc_string_t *const string) |
| | Converts all upper case characters to lower case. More...
|
| |
| int | amxc_string_bytes_2_hex_binary (amxc_string_t *const string, const char bytes[], const uint32_t len, const char *sep) |
| | Creates a hexbinary string from an array of bytes. More...
|
| |
| int | amxc_string_hex_binary_2_bytes (const amxc_string_t *const string, char **bytes, uint32_t *len, const char *sep) |
| | Creates an array of bytes from a hex binary string. More...
|
| |
Ambiorix string API implementation.
Definition in file amxc_string.c.