mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-24 19:07:52 +02:00
Patch from Darin Adler to restore Glib-1.2 handling of empty strings, and
Fri Aug 24 11:15:46 2001 Owen Taylor <otaylor@redhat.com> * glib/gstrfuncs.c docs/Changes-2.0.txt: Patch from Darin Adler to restore Glib-1.2 handling of empty strings, and to fix off-by-one with @max_tokens. (#57663). Doc improvements. * tests/strfunc-test.c: Change tests to correspond to new behavior of g_strsplit().
This commit is contained in:
@@ -358,20 +358,12 @@ nesting such as g_strup (g_strcanon (str)).
|
||||
|
||||
<!-- ##### FUNCTION g_strsplit ##### -->
|
||||
<para>
|
||||
Splits a string into a maximum of @max_tokens pieces, using the given
|
||||
@delimiter. If @max_tokens is reached, the last piece contains the
|
||||
remainder of @string. If @string is an empty string, then the resulting
|
||||
string array has no elements.
|
||||
</para>
|
||||
|
||||
@string: a string to split.
|
||||
@delimiter: a string which specifies the places at which to split the string.
|
||||
The delimiter is not included in any of the resulting strings, unless
|
||||
max_tokens is reached.
|
||||
@max_tokens: the maximum number of pieces to split @string into. If this is
|
||||
less than 1, the string is split completely.
|
||||
@Returns: a newly-allocated NULL-terminated array of strings. Use g_strfreev()
|
||||
to free it.
|
||||
@string:
|
||||
@delimiter:
|
||||
@max_tokens:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION g_strfreev ##### -->
|
||||
|
Reference in New Issue
Block a user