|
GRU - Generic Reusable Utilities
|
#include <stdint.h>#include "collection/gru_list.h"#include "common/gru_alloc.h"#include "gru_util.h"Functions | |
| char * | gru_rtrim (char *input, size_t size) |
| Removes spaces from the right side of a string. More... | |
| char * | gru_ltrim (char *input, size_t size) |
| Removes spaces from the left side of a string. More... | |
| char * | gru_trim (char *input, size_t size) |
| Removes spaces from all sides of a string. More... | |
| const char * | gru_get_name_from_url (const char *url, size_t size) |
| Given an URL, this function will return the file name for the download. More... | |
| gru_list_t * | gru_split (const char *str, char sep, gru_status_t *status) |
| Split a string. More... | |
| void | gru_split_clean (gru_list_t *list) |
| Cleans a string list returned by gru_split and free's the memory used by the strings created for each sub-part. More... | |
| char * | gru_str_serialize (gru_list_t *list, char sep, gru_status_t *status) |
| Serializes a string list. More... | |
| const char * gru_get_name_from_url | ( | const char * | url, |
| size_t | size | ||
| ) |
Given an URL, this function will return the file name for the download.
| url | The url |
| char * gru_ltrim | ( | char * | input, |
| size_t | size | ||
| ) |
Removes spaces from the left side of a string.
| input | Input string |
| size | Size of the string |
| char * gru_rtrim | ( | char * | input, |
| size_t | size | ||
| ) |
Removes spaces from the right side of a string.
| input | Input string |
| size | Size of the string |
| gru_list_t * gru_split | ( | const char * | str, |
| char | sep, | ||
| gru_status_t * | status | ||
| ) |
Split a string.
| str | the string to split |
| set | separator |
| status | status object |
| void gru_split_clean | ( | gru_list_t * | list | ) |
Cleans a string list returned by gru_split and free's the memory used by the strings created for each sub-part.
| list | the list to clean |
| char * gru_str_serialize | ( | gru_list_t * | list, |
| char | sep, | ||
| gru_status_t * | status | ||
| ) |
| char * gru_trim | ( | char * | input, |
| size_t | size | ||
| ) |
Removes spaces from all sides of a string.
| input | Input string |
| size | Size of the string |