Functions | |
| int | qsort_numeric_strcmp (const void *str1, const void *str2) |
| Qsort numeric string compare function. | |
| int | qsort_strcmp (const void *str1, const void *str2) |
| Qsort string compare function. | |
| char * | string_copy (const char *string) |
| Copy a string. | |
| char * | string_create (const char *format,...) |
| Create a new string. | |
| char * | string_create_va_list (const char *format, va_list args) |
| Create a new string. | |
| char * | trim_trailing_spaces (char *string) |
| Trim all space characters from the end of a string. | |
| int qsort_numeric_strcmp | ( | const void * | str1, | |
| const void * | str2 | |||
| ) |
Qsort numeric string compare function.
This function can be used by qsort to sort an array of string pointers by using the numeric values found within the strings. The first numbers found in the strings will be compared, if those are equal the next numbers found will be used, and so on and so fourth, until no more numbers are found in the strings. If all numeric values are equal, the strcmp result will be returned.
| str1 | - pointer to pointer to string 1 | |
| str2 | - pointer to pointer to string 2 |
Definition at line 55 of file string_utils.c.
| int qsort_strcmp | ( | const void * | str1, | |
| const void * | str2 | |||
| ) |
Qsort string compare function.
This function can be used by qsort to sort an array of string pointers.
| str1 | - pointer to pointer to string 1 | |
| str2 | - pointer to pointer to string 2 |
Definition at line 90 of file string_utils.c.
| char* string_copy | ( | const char * | string | ) |
Copy a string.
The returned string is dynamically allocated and must be freed by the calling process.
| string | - the string to copy |
Definition at line 109 of file string_utils.c.
| char* string_create | ( | const char * | format, | |
| ... | ||||
| ) |
Create a new string.
This functions creates a new string under the control of the format argument. The returned string is dynamically allocated and must be freed by the calling process.
| format | - format string (see printf) | |
| ... | - arguments for the format string |
Definition at line 143 of file string_utils.c.

| char* string_create_va_list | ( | const char * | format, | |
| va_list | args | |||
| ) |
Create a new string.
This functions creates a new string under the control of the format argument. The returned string is dynamically allocated and must be freed by the calling process.
| format | - format string (see printf) | |
| args | - arguments for the format string |
Definition at line 177 of file string_utils.c.
| char* trim_trailing_spaces | ( | char * | string | ) |
Trim all space characters from the end of a string.
This function replaces all isspace() characters at the end of a string with the terminating null character.
| string | - the string to trim |
Definition at line 226 of file string_utils.c.
1.5.6