mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-24 01:48:53 +02:00
Fix new strfuncs back up (again) - No, incrementing pointers in a loop is
Fix new strfuncs back up (again) - No, incrementing pointers in a loop is not any faster than indexing an array in a loop with a good compiler, but it is harder to read. - strconcat doesn't allow a separator - added g_str_array_join, renamed g_str_array_join to g_str_array_joinv - join routines take separator as first argument, as is customary.
This commit is contained in:
8
glib.h
8
glib.h
@@ -1377,15 +1377,17 @@ gchar* g_strconcat (const gchar *string1,
|
||||
/* NULL terminated string arrays.
|
||||
* g_str_array_split() splits up string into max_tokens tokens at delim and
|
||||
* returns a newly allocated string array.
|
||||
* g_str_array_join() concatenates all of str_array's strings, sliding in an
|
||||
* g_str_array_joinv() concatenates all of str_array's strings, sliding in an
|
||||
* optional separator, the returned string is newly allocated.
|
||||
* g_str_array_free() frees the array itself and all of its strings.
|
||||
*/
|
||||
gchar** g_str_array_split (const gchar *string,
|
||||
const gchar *delimiter,
|
||||
gint max_tokens);
|
||||
gchar* g_str_array_join (gchar **str_array,
|
||||
const gchar *separator);
|
||||
gchar* g_str_array_joinv (const gchar *separator,
|
||||
const gchar **str_array);
|
||||
gchar* g_str_array_join (const gchar *separator,
|
||||
...);
|
||||
void g_str_array_free (gchar **str_array);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user