Functions | |
| char * | se_skip_leading_spaces (char *buffer) |
| Returns a new pointer from buffer past the leading spaces. | |
| void | se_remove_trailing_spaces (char *buffer) |
| Removes spaces from buffer by replacing the first trailing space with a NULL terminator. | |
| int | se_icompare (const char *a, const char *b) |
| Compares a with b, regardless of case. | |
| int | se_incompare (const char *a, const char *b, const size_t n) |
| Compares a with b, regardless of case for n characters. | |
| char * | se_trim_spaces (char *buffer) |
| Trims leading and trailing spaces from a string. | |
| bool | se_is_space (const char ch) |
| Returns true if the given character is a tab or space. | |
| bool | se_to_ulint (const char *buffer, unsigned long int *dest) |
| Attempts to parse the string in buffer as an unsigned long int in base-10. | |
| bool | se_to_float (const char *buffer, float *dest) |
| Attempts to parse the string in buffer as a floating point. | |
| char * | se_nchr (char *buffer, const size_t n, const char ch) |
| Returns the first occurance of the given character for a max of n characters. | |
| int se_icompare | ( | const char * | a, | |
| const char * | b | |||
| ) |
Compares a with b, regardless of case.
| a | The string to compare b with. | |
| b | The string to compare a with. |
| int se_incompare | ( | const char * | a, | |
| const char * | b, | |||
| const size_t | n | |||
| ) |
Compares a with b, regardless of case for n characters.
| a | The string to compare b with. | |
| b | The string to compare a with. | |
| n | The maximum number of characters to compare. |
| bool se_is_space | ( | const char | ch | ) |
Returns true if the given character is a tab or space.
| ch | The char to test. |
| char* se_nchr | ( | char * | buffer, | |
| const size_t | n, | |||
| const char | ch | |||
| ) |
Returns the first occurance of the given character for a max of n characters.
| buffer | The string to search in. | |
| ch | The char to search for. | |
| n | The maximum number of characters to traverse. |
| void se_remove_trailing_spaces | ( | char * | buffer | ) |
Removes spaces from buffer by replacing the first trailing space with a NULL terminator.
| buffer | The NULL terminated string to remove spaces from. |
| char* se_skip_leading_spaces | ( | char * | buffer | ) |
Returns a new pointer from buffer past the leading spaces.
Note: Be careful with malloc()'d memory since the pointer will be lost unless you save it. A space is anything given by isspace(ch).
| buffer | The NULL terminated string to skip spaces from. |
| bool se_to_float | ( | const char * | buffer, | |
| float * | dest | |||
| ) |
Attempts to parse the string in buffer as a floating point.
| buffer | The string to parse. | |
| dest | Where to put the float. Only written to on success. |
| bool se_to_ulint | ( | const char * | buffer, | |
| unsigned long int * | dest | |||
| ) |
Attempts to parse the string in buffer as an unsigned long int in base-10.
| buffer | The string to parse. | |
| dest | Where to put the unsigned long integer. Only written to on success. |
| char* se_trim_spaces | ( | char * | buffer | ) |
Trims leading and trailing spaces from a string.
| buffer | The NULL terminated string to trim spaces from. |
1.6.2