A separated list of strings. More...
Include dependency graph for slist.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | Slist |
| String list. More... | |
Functions | |
| struct Slist * | slist_add_string (struct Slist *list, const char *str) |
| Add a string to a list. | |
| struct Slist * | slist_dup (const struct Slist *list) |
| Create a copy of an Slist object. | |
| bool | slist_equal (const struct Slist *a, const struct Slist *b) |
| Compare two string lists. | |
| void | slist_free (struct Slist **ptr) |
| Free an Slist object. | |
| bool | slist_is_empty (const struct Slist *list) |
| Is the slist empty? | |
| bool | slist_is_member (const struct Slist *list, const char *str) |
| Is a string a member of a list? | |
| struct Slist * | slist_new (uint32_t flags) |
| Create a new string list. | |
| struct Slist * | slist_parse (const char *str, uint32_t flags) |
| Parse a list of strings into a list. | |
| struct Slist * | slist_remove_string (struct Slist *list, const char *str) |
| Remove a string from a list. | |
| int | slist_to_buffer (const struct Slist *list, struct Buffer *buf) |
| Export an Slist to a Buffer. | |
A separated list of strings.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file slist.h.
Add a string to a list.
| list | List to modify |
| str | String to add |
| ptr | Modified list |
Definition at line 68 of file slist.c.
Here is the call graph for this function:
Here is the caller graph for this function:Create a copy of an Slist object.
| list | Slist to duplicate |
| ptr | New Slist object |
Definition at line 108 of file slist.c.
Here is the call graph for this function:
Here is the caller graph for this function:Compare two string lists.
| a | First list |
| b | Second list |
| true | They are identical |
Definition at line 91 of file slist.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void slist_free | ( | struct Slist ** | ptr | ) |
Free an Slist object.
| ptr | Slist to free |
Definition at line 124 of file slist.c.
Here is the call graph for this function:
Here is the caller graph for this function:| bool slist_is_empty | ( | const struct Slist * | list | ) |
| bool slist_is_member | ( | const struct Slist * | list, |
| const char * | str | ||
| ) |
Is a string a member of a list?
| list | List to modify |
| str | String to find |
| true | String is in the list |
Definition at line 154 of file slist.c.
Here is the call graph for this function:
Here is the caller graph for this function:| struct Slist * slist_new | ( | uint32_t | flags | ) |
Create a new string list.
| flags | Flag to set, e.g. D_SLIST_SEP_COMMA |
| ptr | New string list |
Definition at line 51 of file slist.c.
Here is the caller graph for this function:| struct Slist * slist_parse | ( | const char * | str, |
| uint32_t | flags | ||
| ) |
Parse a list of strings into a list.
| str | String of strings |
| flags | Flags, e.g. D_SLIST_ALLOW_EMPTY |
| ptr | New Slist object |
Definition at line 177 of file slist.c.
Here is the call graph for this function:
Here is the caller graph for this function:Remove a string from a list.
| list | List to modify |
| str | String to remove |
| ptr | Modified list |
Definition at line 235 of file slist.c.
Here is the call graph for this function:
Here is the caller graph for this function:| list | List to export |
| buf | Buffer for the results |
| num | Number of strings written to Buffer |
Definition at line 269 of file slist.c.
Here is the call graph for this function:
Here is the caller graph for this function: