|
libcmutils 0.6.5
Multi-platform C99 utility library
|
Dynamic array of string objects. More...
Data Fields | |
| void(* | Add )(CMUTIL_StringArray *array, CMUTIL_String *string) |
| Add a string object to this array. | |
| void(* | AddCString )(CMUTIL_StringArray *array, const char *string) |
| Add a new c-style string. | |
| CMBool(* | InsertAt )(CMUTIL_StringArray *array, CMUTIL_String *string, uint32_t index) |
| Insert a string object to this array at the index. | |
| CMBool(* | InsertAtCString )(CMUTIL_StringArray *array, const char *string, uint32_t index) |
| Insert a new c-style string at the given index. | |
| CMUTIL_String *(* | RemoveAt )(CMUTIL_StringArray *array, uint32_t index) |
| Remove string element at given index, and return it. | |
| CMUTIL_String *(* | SetAt )(CMUTIL_StringArray *array, CMUTIL_String *string, uint32_t index) |
| Set the new string object to this array at given index and old string will be returned. | |
| CMUTIL_String *(* | SetAtCString )(CMUTIL_StringArray *array, const char *string, uint32_t index) |
| Set a new c-style string to this array at given index and old string will be returned. | |
| const CMUTIL_String *(* | GetAt )(const CMUTIL_StringArray *array, uint32_t index) |
| Get string object at given index. | |
| const char *(* | GetCString )(const CMUTIL_StringArray *array, uint32_t index) |
| Get c-style string at the given index. | |
| size_t(* | GetSize )(const CMUTIL_StringArray *array) |
| Get the number of items in this array. | |
| CMUTIL_Iterator *(* | Iterator )(const CMUTIL_StringArray *array) |
| Get the iterator of this array. | |
| void(* | Destroy )(CMUTIL_StringArray *array) |
| Destroy this array object and it's contents. | |
| void(* | PrintTo )(const CMUTIL_StringArray *array, CMUTIL_String *out) |
| Function pointer used to format and output the contents of a string array. | |
Dynamic array of string objects.
| void(* CMUTIL_StringArray::Add) (CMUTIL_StringArray *array, CMUTIL_String *string) |
Add a string object to this array.
Note that ownership of the string object will be moved to this array object. So destroying the original string will lead to undefined behavior. Destroying this array object will destroy all owned strings.
| array | This string array object. |
| string | String object to be added, ownership of the string object will be moved to this array object. |
| void(* CMUTIL_StringArray::AddCString) (CMUTIL_StringArray *array, const char *string) |
Add a new c-style string.
This method will create a new CMUTIL_String object whose contents will be the same as the given string.
| array | This string array object. |
| string | C-style (NULL-terminated) string to be added. |
| CMBool(* CMUTIL_StringArray::InsertAt) (CMUTIL_StringArray *array, CMUTIL_String *string, uint32_t index) |
Insert a string object to this array at the index.
Note that ownership of the string object will be moved to this array object. So destroying the original string will lead to undefined behavior. Destroying this array object will destroy all owned strings.
| array | This string array object. |
| string | String object to be added, ownership of the string object will be moved to this array object if CMTrue returned. |
| index | The index where the new string will be inserted. |
| CMBool(* CMUTIL_StringArray::InsertAtCString) (CMUTIL_StringArray *array, const char *string, uint32_t index) |
Insert a new c-style string at the given index.
This method will create a new CMUTIL_String object whose contents will be the same as given string.
| array | This string array object. |
| string | C-style (NULL-terminated) string to be added. |
| index | The index where the new string will be inserted. |
| CMUTIL_String *(* CMUTIL_StringArray::RemoveAt) (CMUTIL_StringArray *array, uint32_t index) |
Remove string element at given index, and return it.
Note, this method will transfer ownership of the result string to the caller. The caller must receive the return value and destroy it after use.
| array | This string array object. |
| index | The index where the string wanted to remove. |
| CMUTIL_String *(* CMUTIL_StringArray::SetAt) (CMUTIL_StringArray *array, CMUTIL_String *string, uint32_t index) |
Set the new string object to this array at given index and old string will be returned.
Note that ownership of the string object will be moved to this array object. So destroying the original string will lead to undefined behavior. Destroying this array object will destroy all owned strings. And this method will transfer ownership of the result string to the caller. The caller must receive the return value and destroy it after use.
| array | This string array object. |
| string | String object to be added, ownership of the string object will be moved to this array object if CMTrue returned. |
| index | The index where the string wanted to remove. |
| CMUTIL_String *(* CMUTIL_StringArray::SetAtCString) (CMUTIL_StringArray *array, const char *string, uint32_t index) |
Set a new c-style string to this array at given index and old string will be returned.
Note this method will transfer ownership of the result string to the caller. The caller must receive the return value and destroy it after use.
| array | This string array object. |
| string | C-style (NULL-terminated) string to be added. |
| index | The index where the string wanted to remove. |
| const CMUTIL_String *(* CMUTIL_StringArray::GetAt) (const CMUTIL_StringArray *array, uint32_t index) |
Get string object at given index.
Note, this method does not transfer ownership of the result string to the caller. The caller must not destroy the result object.
| array | This string array object. |
| index | The index where the string wanted to get. |
| const char *(* CMUTIL_StringArray::GetCString) (const CMUTIL_StringArray *array, uint32_t index) |
Get c-style string at the given index.
| array | This string array object. |
| index | The index where the string wanted to get. |
| size_t(* CMUTIL_StringArray::GetSize) (const CMUTIL_StringArray *array) |
Get the number of items in this array.
| array | This string array object. |
| CMUTIL_Iterator *(* CMUTIL_StringArray::Iterator) (const CMUTIL_StringArray *array) |
Get the iterator of this array.
| array | This string object. |
| void(* CMUTIL_StringArray::Destroy) (CMUTIL_StringArray *array) |
Destroy this array object and it's contents.
| array | This string object. |
| void(* CMUTIL_StringArray::PrintTo) (const CMUTIL_StringArray *array, CMUTIL_String *out) |
Function pointer used to format and output the contents of a string array.
This function pointer allows the user to specify a custom implementation for processing a string array and formatting its contents into a string output.
| array | Pointer to the CMUTIL_StringArray object that contains the input strings. |
| out | Pointer to the CMUTIL_String object where the formatted output will be stored. |