Declaration of the SplitList structure and the functions for working with splitting a string based on one or more delimiters. More...
#include "stringlist.h"

Go to the source code of this file.
Classes | |
| struct | SplitList |
| Represents a collection of sub-strings split from a single string using the split() function. More... | |
Macros | |
| #define | __SPLIT_H__ |
Typedefs | |
| typedef struct SplitList | SplitList |
| Represents a collection of sub-strings split from a single string using the split() function. | |
Functions | |
| void | SplitList_Clear (SplitList *list) |
| Clear the given SplitList object so it can be reused again. Releases the list of sub-strings (but does not delete the sub-strings themselves, which are assumed to be pointers into an existing string). | |
| void | split (char *s, const char *splitChars, SplitList *components) |
| Split the given path into multiple strings based on the given delimiter. The pointers to each string are returned in the given StringList object. | |
Declaration of the SplitList structure and the functions for working with splitting a string based on one or more delimiters.
Definition in file helpers/split.h.
| #define __SPLIT_H__ |
Definition at line 8 of file helpers/split.h.
Represents a collection of sub-strings split from a single string using the split() function.
| void split | ( | char * | s, |
| const char * | splitChars, | ||
| SplitList * | components | ||
| ) |
Split the given path into multiple strings based on the given delimiter. The pointers to each string are returned in the given StringList object.
| s | String to split into components. Will be altered. |
| splitChars | A list of one or more characters on which to split the string. If NULL or empty, defaults to a single space. |
| components | A SplitList object that will be updated with pointers to the sub-strings and the count of sub-strings. This object is cleared of any previous strings before being filled up again. |
Definition at line 72 of file split.c.
References SplitList_AddString(), and SplitList_Clear().
Referenced by _FindEntry(), _State_DisplayText(), and getcursorposition().
| void SplitList_Clear | ( | SplitList * | list | ) |
Clear the given SplitList object so it can be reused again. Releases the list of sub-strings (but does not delete the sub-strings themselves, which are assumed to be pointers into an existing string).
| list | A SplitList object to clear. |
Definition at line 30 of file split.c.
References SplitList::strings, and SplitList::strings_count.
Referenced by _FindEntry(), getcursorposition(), and split().