Teonet library
0.4.7
|
Macros | |
#define | MAX_STRING_LEN 1024 |
#define | arr_realloc(_len_) |
#define | arr_inc_size(_pos_) |
Functions | |
ksnet_stringArr | ksnet_stringArrCreate () |
Create empty c string array. More... | |
ksnet_stringArr | ksnet_stringArrAdd (ksnet_stringArr *arr, const char *str) |
Add c string to string array. More... | |
int | ksnet_stringArrLength (ksnet_stringArr arr) |
Get length of string array. More... | |
int | ksnet_stringArrMoveTo (ksnet_stringArr arr, unsigned int fromIdx, unsigned toIdx) |
Move array item from one position to another. More... | |
ksnet_stringArr | ksnet_stringArrFree (ksnet_stringArr *arr) |
Free string array. More... | |
ksnet_stringArr | ksnet_stringArrSplit (const char *string, const char *separators, int with_empty, int max_parts) |
Split string by separators into words. More... | |
char * | ksnet_stringArrCombine (ksnet_stringArr arr, const char *separator) |
Combine string array to string. More... | |
#define arr_inc_size | ( | _pos_ | ) |
Referenced by ksnet_stringArrSplit().
#define arr_realloc | ( | _len_ | ) |
Referenced by ksnet_stringArrSplit().
#define MAX_STRING_LEN 1024 |
Referenced by ksnet_stringArrSplit().
ksnet_stringArr ksnet_stringArrAdd | ( | ksnet_stringArr * | arr, |
const char * | str | ||
) |
Add c string to string array.
str | |
arr |
References ksnet_stringArrLength(), teo_malloc(), and teo_realloc().
Referenced by teo::StringArray::add(), getIPs(), and ksnTDBkeyList().
char* ksnet_stringArrCombine | ( | ksnet_stringArr | arr, |
const char * | separator | ||
) |
Combine string array to string.
arr | String array |
separator |
References malloc().
Referenced by test_3_5().
ksnet_stringArr ksnet_stringArrCreate | ( | ) |
ksnet_stringArr ksnet_stringArrFree | ( | ksnet_stringArr * | arr | ) |
Free string array.
arr |
References free().
Referenced by createCmdConnectRPacketUdp(), event_cb(), open_local_port(), and test_3_5().
int ksnet_stringArrLength | ( | ksnet_stringArr | arr | ) |
Get length of string array.
arr |
Referenced by createCmdConnectRPacketUdp(), ksnet_stringArrAdd(), ksnet_stringArrMoveTo(), open_local_port(), teo::StringArray::size(), and test_3_5().
int ksnet_stringArrMoveTo | ( | ksnet_stringArr | arr, |
unsigned int | fromIdx, | ||
unsigned | toIdx | ||
) |
Move array item from one position to another.
arr | |
fromIdx | |
toIdx |
References ksnet_stringArrLength().
Referenced by teo::StringArray::move().
ksnet_stringArr ksnet_stringArrSplit | ( | const char * | string, |
const char * | separators, | ||
int | with_empty, | ||
int | max_parts | ||
) |
Split string by separators into words.
string | |
separators | |
with_empty | |
max_parts | Number of parts. if max_parts == 0 then there isn't parts limit |
References arr_inc_size, arr_realloc, malloc(), MAX_STRING_LEN, and result.
Referenced by ksnetEvMgrRestart().