RetroArch
Classes | Functions
string_list.h File Reference
#include <retro_common_api.h>
#include <boolean.h>
#include <stdlib.h>
#include <stddef.h>
Include dependency graph for string_list.h:

Go to the source code of this file.

Classes

union  string_list_elem_attr
 
struct  string_list_elem
 
struct  string_list
 

Functions

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)
 
struct string_liststring_split (const char *str, const char *delim)
 
struct string_liststring_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_free (struct string_list *list)
 
void string_list_join_concat (char *buffer, size_t size, const struct string_list *list, const char *sep)
 
void string_list_set (struct string_list *list, unsigned idx, const char *str)
 

Function Documentation

◆ string_list_append()

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).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ string_list_append_n()

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).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ string_list_find_elem()

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).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ string_list_find_elem_prefix()

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).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ string_list_free()

void string_list_free ( struct string_list list)

string_list_free : pointer to string list object

Frees a string list.

Here is the call graph for this function:

◆ string_list_join_concat()

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 .

Here is the call graph for this function:
Here is the caller graph for this function:

◆ string_list_new()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ string_list_set()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ string_split()

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.

Here is the call graph for this function:
Here is the caller graph for this function: