mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-09 10:44:04 +02:00
Fix some documentation issue in glib/gstrfuncs.c
Apparently, the documentation of g_strcanon() was not really cristal clear, so this new code sample try to make it clear the fact that we are working on the given string and not a copy. Moreover, it provides a way to keep the original string at once. Fix #29
This commit is contained in:
@@ -1992,6 +1992,13 @@ g_strncasecmp (const gchar *s1,
|
|||||||
* g_ascii_strup (g_strdelimit (str, "abc", '?'))
|
* g_ascii_strup (g_strdelimit (str, "abc", '?'))
|
||||||
* ]|
|
* ]|
|
||||||
*
|
*
|
||||||
|
* In order to modify a copy, you may use `g_strdup()`:
|
||||||
|
* |[<!-- language="C" -->
|
||||||
|
* reformatted = g_strdelimit (g_strdup (const_str), "abc", '?');
|
||||||
|
* ...
|
||||||
|
* g_free (reformatted);
|
||||||
|
* ]|
|
||||||
|
*
|
||||||
* Returns: @string
|
* Returns: @string
|
||||||
*/
|
*/
|
||||||
gchar *
|
gchar *
|
||||||
@@ -2029,6 +2036,13 @@ g_strdelimit (gchar *string,
|
|||||||
* g_ascii_strup (g_strcanon (str, "abc", '?'))
|
* g_ascii_strup (g_strcanon (str, "abc", '?'))
|
||||||
* ]|
|
* ]|
|
||||||
*
|
*
|
||||||
|
* In order to modify a copy, you may use `g_strdup()`:
|
||||||
|
* |[<!-- language="C" -->
|
||||||
|
* reformatted = g_strcanon (g_strdup (const_str), "abc", '?');
|
||||||
|
* ...
|
||||||
|
* g_free (reformatted);
|
||||||
|
* ]|
|
||||||
|
*
|
||||||
* Returns: @string
|
* Returns: @string
|
||||||
*/
|
*/
|
||||||
gchar *
|
gchar *
|
||||||
|
Reference in New Issue
Block a user