UTF-8 aware string list
| s_str_list_new | Create a new string list. |
| s_str_list_split | Create a new string list by splitting the given string with the given separator. |
| s_str_list_delete | Delete the given string list. |
| s_str_list_find_index | Find the string in the given string list which matches the given string. |
| s_str_list_find | Find the string list element in the given string list, which matches the given string. |
| s_str_list_index | Find the index into the given string list of the given string list element. |
| s_str_list_nth | Find the nth string element in the given string list. |
| s_str_list_nth_string | Find the nth string in the given string list. |
| s_str_list_first | Return the first string element in the given string list. |
| s_str_list_last | Return the last string element in the given string list. |
| s_str_list_element_get | Get the given string list element’s string. |
| s_str_list_element_replace | Replace the given string list element’s string. |
| s_str_list_element_unlink | Unlink the given string list element from it’s parent string list, and return the string list element’s string. |
| s_str_list_element_delete | Delete the given string list element from it’s parent string list, and free the string list element’s string. |
| s_str_list_element_next | Return the next string list element in the string list, relative to the given one. |
| s_str_list_element_prev | Return the previous string list element in the string list, relative to the given one. |
| s_str_list_isempty | Query if the given string list has any elements. |
| s_str_list_size | Get the number of elements in the given string list. |
| s_str_list_push | Push the given string onto end of given string list. |
| s_str_list_pop | Pop last string from the given string list. |
| s_str_list_reverse | Reverse the order of the string list elements in the given string list. |
| s_str_list_prepend | Prepend a string to beginning of the given string list. |
| s_str_list_append | Append a string to end of the given string list. |
| s_str_list_insert_before | Insert a string before given string list element. |
| s_str_list_insert_after | Insert a string after given string list element. |
| s_str_list_dup | Return a newly allocated copy of the given string list, which must later be freed by the caller. |
| s_str_list_slice | Return a newly allocated slice of the given string list, which must later be freed by the caller. |
| s_str_list_cmp | Compare the elements of two string lists. |
| s_str_list_merge | Merge two string lists. |
| s_str_list_to_string | Convert the string list to a string with the given separator between elements of the string list. |
Opaque definition of a string list, same as an s_list.
Opaque definition of a string list element, same as an s_list_element.
The list element represents one element in the string list.
Create a new string list.
| Parameters: |
|
|---|---|
| Return: | Pointer to the newly created string list. |
Create a new string list by splitting the given string with the given separator.
| Parameters: |
|
|---|---|
| Return: | Pointer to the newly created string list. |
Delete the given string list.
Deletes the list and frees up all the strings contained in the list.
| Parameters: |
|
|---|
Find the string in the given string list which matches the given string.
| Parameters: |
|
|---|---|
| Return: | Pointer to the string list element which matches the data, else NULL. |
| Note: | String lists are indexed starting from 0. The index variable will be relative if f is notNULL. |
Find the string list element in the given string list, which matches the given string.
| Parameters: |
|
|---|---|
| Return: | Pointer to the string list element which matches the given string, else NULL if no match. |
| Note: | Returns the first match. |
Find the index into the given string list of the given string list element.
| Parameters: |
|
|---|---|
| Return: | Pointer to the string list element which matches the data, else NULL. |
| Note: | String lists are indexed starting from 0. |
Find the nth string element in the given string list.
| Parameters: |
|
|---|---|
| Return: | Pointer to the nth string list element or NULL if index is out of bounds. |
| Note: | The string list elements are indexed from 0. |
Find the nth string in the given string list.
| Parameters: |
|
|---|---|
| Return: | Pointer to the nth string or NULL if index is out of bounds. |
| Note: | The string list elements are indexed from 0. |
Return the first string element in the given string list.
| Parameters: |
|
|---|---|
| Return: | Pointer to the first string element in the list. |
Return the last string element in the given string list.
| Parameters: |
|
|---|---|
| Return: | Pointer to the last string element in the list. |
Get the given string list element’s string.
| Parameters: |
|
|---|---|
| Return: | Pointer to the string list element’s string. |
Replace the given string list element’s string.
The replaced string is freed.
| Parameters: |
|
|---|---|
| Note: | Internally a duplicate of string is made and ownership taken thereof. |
Unlink the given string list element from it’s parent string list, and return the string list element’s string.
| Parameters: |
|
|---|---|
| Return: | Pointer to the unlinked string list element’s string. |
| Note: | Caller is responsible for the returned string’s memory. |
Delete the given string list element from it’s parent string list, and free the string list element’s string.
| Parameters: |
|
|---|---|
| Return: | Pointer to the previous string list element or NULL if none. |
Return the next string list element in the string list, relative to the given one.
| Parameters: |
|
|---|---|
| Return: | Pointer to the next string list element in the string list. |
Return the previous string list element in the string list, relative to the given one.
| Parameters: |
|
|---|---|
| Return: | Pointer to the previous string list element in the string list. |
Query if the given string list has any elements.
| Parameters: |
|
|---|---|
| Return: |
Get the number of elements in the given string list.
| Parameters: |
|
|---|---|
| Return: | The number of elements in the string list. |
Push the given string onto end of given string list.
Same as s_str_list_append.
| Parameters: |
|
|---|---|
| Note: | Internally a duplicate of string is made and ownership taken thereof. |
Pop last string from the given string list.
Removes last string list element from the string list and returns the string list element’s string.
| Parameters: |
|
|---|---|
| Return: | Pointer to popped string. |
| Note: | The caller is responsible for the memory of the returned string. |
Reverse the order of the string list elements in the given string list.
| Parameters: |
|
|---|---|
| Note: | The string list element’s strings are not reversed. |
Prepend a string to beginning of the given string list.
| Parameters: |
|
|---|---|
| Note: | Internally a duplicate of string is made and ownership taken thereof. |
Append a string to end of the given string list.
| Parameters: |
|
|---|---|
| Note: | Internally a duplicate of string is made and ownership taken thereof. |
Insert a string before given string list element.
Return reference to inserted string element.
| Parameters: |
|
|---|---|
| Return: | Pointer to the inserted string list element. |
| Note: | Internally a duplicate of string is made and ownership taken thereof. |
Insert a string after given string list element.
Return reference to inserted string element.
| Parameters: |
|
|---|---|
| Return: | Pointer to the inserted string list element. |
| Note: | Internally a duplicate of string is made and ownership taken thereof. |
Return a newly allocated copy of the given string list, which must later be freed by the caller.
| Parameters: |
|
|---|---|
| Return: | A copy of src. |
| Note: | This is a deep copy . |
Return a newly allocated slice of the given string list, which must later be freed by the caller.
| Parameters: |
|
|---|---|
| Return: | A slice of src. |
| Note: | This is a deep copy . |
Compare the elements of two string lists.
| Parameters: |
|
|---|---|
| Return: | -1 if lists compare exactly, else the number of elements that compare. |
Merge two string lists.
Append all the string list elements of one list onto another list.
| Parameters: |
|
|---|
Convert the string list to a string with the given separator between elements of the string list.
| Parameters: |
|
|---|---|
| Return: | The string list as a string. |
| Note: | The caller is responsible for the memory of the returned string. |