RetroArch
|
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <lists/string_list.h>
#include <compat/strl.h>
#include <compat/posix_string.h>
#include <string/stdstring.h>
Functions | |
void | string_list_free (struct string_list *list) |
static bool | string_list_capacity (struct string_list *list, size_t cap) |
struct string_list * | string_list_new (void) |
bool | string_list_append (struct string_list *list, const char *elem, union string_list_elem_attr attr) |
bool | string_list_append_n (struct string_list *list, const char *elem, unsigned length, union string_list_elem_attr attr) |
void | string_list_set (struct string_list *list, unsigned idx, const char *str) |
void | string_list_join_concat (char *buffer, size_t size, const struct string_list *list, const char *delim) |
struct string_list * | string_split (const char *str, const char *delim) |
int | string_list_find_elem (const struct string_list *list, const char *elem) |
bool | string_list_find_elem_prefix (const struct string_list *list, const char *prefix, const char *elem) |
bool string_list_append | ( | struct string_list * | list, |
const char * | elem, | ||
union string_list_elem_attr | attr | ||
) |
string_list_append: : pointer to string list : element to add to the string list : attributes of new element.
Appends a new element to the string list.
Returns: true (1) if successful, otherwise false (0).
bool string_list_append_n | ( | struct string_list * | list, |
const char * | elem, | ||
unsigned | length, | ||
union string_list_elem_attr | attr | ||
) |
string_list_append_n: : pointer to string list : element to add to the string list : read at most this many bytes from elem : attributes of new element.
Appends a new element to the string list.
Returns: true (1) if successful, otherwise false (0).
|
static |
string_list_capacity: : pointer to string list : new capacity for string list.
Change maximum capacity of string list's size.
Returns: true (1) if successful, otherwise false (0).
int string_list_find_elem | ( | const struct string_list * | list, |
const char * | elem | ||
) |
string_list_find_elem: : pointer to string list : element to find inside the string list.
Searches for an element () inside the string list.
Returns: true (1) if element could be found, otherwise false (0).
bool string_list_find_elem_prefix | ( | const struct string_list * | list, |
const char * | prefix, | ||
const char * | elem | ||
) |
string_list_find_elem_prefix: : pointer to string list : prefix to append to : element to find inside the string list.
Searches for an element () inside the string list. Will also search for the same element prefixed by .
Returns: true (1) if element could be found, otherwise false (0).
void string_list_free | ( | struct string_list * | list | ) |
string_list_free : pointer to string list object
Frees a string list.
void string_list_join_concat | ( | char * | buffer, |
size_t | size, | ||
const struct string_list * | list, | ||
const char * | delim | ||
) |
string_list_join_concat: : buffer that will be joined to. : length of . : pointer to string list. : delimiter character for .
A string list will be joined/concatenated as a string to , delimited by .
struct string_list* string_list_new | ( | void | ) |
string_list_new:
Creates a new string list. Has to be freed manually.
Returns: new string list if successful, otherwise NULL.
void string_list_set | ( | struct string_list * | list, |
unsigned | idx, | ||
const char * | str | ||
) |
string_list_set: : pointer to string list : index of element in string list : value for the element.
Set value of element inside string list.
struct string_list* string_split | ( | const char * | str, |
const char * | delim | ||
) |
string_split: : string to turn into a string list : delimiter character to use for splitting the string.
Creates a new string list based on string , delimited by .
Returns: new string list if successful, otherwise NULL.