| gumd API Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <gum/common/gum-string-utils.h> #define GUM_STR_DUP (s, d) #define GUM_STR_DUPV (s, d) #define GUM_STR_FREE (s) #define GUM_STR_FREEV (s) gchar ** gum_string_utils_append_string (gchar **src_strv,const gchar *string); gchar ** gum_string_utils_delete_string (gchar **src_strv,const gchar *string); gchar * gum_string_utils_get_string (const gchar *strings,const gchar *separator,guint str_ind); gchar * gum_string_utils_insert_string (const gchar *strings,const gchar *separator,const gchar *str_to_insert,guint str_ind,guint total_strings); gboolean gum_string_utils_search_string (const gchar *strings,const gchar *separator,const gchar *search_str); gboolean gum_string_utils_search_stringv (gchar **stringv,const gchar *search_str);
#define GUM_STR_DUP(s, d)
A helper macro that duplicates source string to destination string after freeing the destination string first if it is not NULL.
|
the source string |
|
the destination string |
#define GUM_STR_DUPV(s, d)
A helper macro that duplicates source string vector to destination string vector after freeing the destination string vector first if it is not NULL.
|
the source string vector |
|
the destination string vector |
#define GUM_STR_FREE(s)
A helper macro that frees the string after checking if it is not NULL.
|
the string to free |
#define GUM_STR_FREEV(s)
A helper macro that frees string vector after checking if it is not NULL.
|
the string vector to free |
gchar ** gum_string_utils_append_string (gchar **src_strv,const gchar *string);
Appends the string to the end of the strings' vector.
|
vector of strings. [transfer none] |
|
string to append. [transfer none] |
Returns : |
concatenated string vector if successful, NULL otherwise. [transfer full] |
gchar ** gum_string_utils_delete_string (gchar **src_strv,const gchar *string);
Deletes the string from the strings' vector.
|
vector of strings. [transfer none] |
|
string to delete. [transfer none] |
Returns : |
modified string vector if string found, NULL otherwise. [transfer full] |
gchar * gum_string_utils_get_string (const gchar *strings,const gchar *separator,guint str_ind);
Gets the str_ind'th string from the strings.
|
vector of strings. [transfer none] |
|
separator between strings. [transfer none] |
|
starting from 0, position for the string to fetch |
Returns : |
string if successful, NULL otherwise. [transfer full] |
gchar * gum_string_utils_insert_string (const gchar *strings,const gchar *separator,const gchar *str_to_insert,guint str_ind,guint total_strings);
Inserts the string at the desired position and returns the concatenated string
|
vector of strings. [transfer none] |
|
separator between strings. [transfer none] |
|
string to insert. [transfer none] |
|
starting from 0, position for the string to insert |
|
total number of strings in the strings vector |
Returns : |
concatenated string vector if successful, NULL otherwise. [transfer full] |
gboolean gum_string_utils_search_string (const gchar *strings,const gchar *separator,const gchar *search_str);
Finds the 'search string' in the strings.
|
concatenated strings in a string placeholder separated by a separator. [transfer none] |
|
separator between strings. [transfer none] |
|
string to search. [transfer none] |
Returns : |
TRUE if found, FALSE otherwise. |
gboolean gum_string_utils_search_stringv (gchar **stringv,const gchar *search_str);
Finds the 'search string' in the string vector.
|
vector of strings. [transfer none] |
|
string to search. [transfer none] |
Returns : |
TRUE if found, FALSE otherwise. |