Functions | |
| char * | lub_string_dup (const char *string) |
| void | lub_string_cat (char **string_ptr, const char *text) |
| void | lub_string_catn (char **string_ptr, const char *text, size_t length) |
| char * | lub_string_dupn (const char *string, unsigned length) |
| const char * | lub_string_suffix (const char *string) |
| int | lub_string_nocasecmp (const char *cs, const char *ct) |
| const char * | lub_string_nocasestr (const char *cs, const char *ct) |
| void | lub_string_free (char *string) |
As a rule of thumb if a function returns "char *" then the calling client becomes responsible for invoking lub_string_free() to release the dynamically allocated memory.
If a "const char *" is returned then the client has no responsiblity for releasing memory.
| void lub_string_cat | ( | char ** | string_ptr, | |
| const char * | text | |||
| ) |
This operation concatinates the specified text onto an existing string.
| string_ptr | A pointer to the string to concatinate |
| text | The text to be appended |
| void lub_string_catn | ( | char ** | string_ptr, | |
| const char * | text, | |||
| size_t | length | |||
| ) |
This operation concatinates a specified length of some text onto an existing string.
| string_ptr | A pointer to the string to concatinate |
| text | The text to be appended |
| length | The length of text to be appended |
| char* lub_string_dup | ( | const char * | string | ) |
This operation duplicates the specified string.
| string | The string to duplicate |
| char* lub_string_dupn | ( | const char * | string, | |
| unsigned | length | |||
| ) |
This operation dupicates a specified length of some text into a new string.
| string | The string containing the text to duplicate |
| length | The length of text to be duplicated |
| void lub_string_free | ( | char * | string | ) |
This operation releases the resources associated with a dynamically allocated string.
| string | The string to be released |
| int lub_string_nocasecmp | ( | const char * | cs, | |
| const char * | ct | |||
| ) |
This operation compares string cs to string ct in a case insensitive manner.
| cs | The first string for the comparison |
| ct | The second string for the comparison |
| const char* lub_string_nocasestr | ( | const char * | cs, | |
| const char * | ct | |||
| ) |
This operation performs a case insensitive search for a substring within another string.
| cs | The string within which to find a substring |
| ct | The substring for which to search |
| const char* lub_string_suffix | ( | const char * | string | ) |
This operation returns a pointer to the last (space separated) word in the specified string.
| string | The string from which to extract a suffix |
1.5.1