mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 23:46:17 +01:00
Merge branch 'th/strdup-in-ascii-strdown' into 'main'
[th/strdup-in-ascii-strdown] glib: use g_strdup() in g_ascii_strdown(),g_ascii_strup() See merge request GNOME/glib!3850
This commit is contained in:
commit
7bb8a22494
@ -1555,9 +1555,10 @@ g_ascii_strdown (const gchar *str,
|
||||
g_return_val_if_fail (str != NULL, NULL);
|
||||
|
||||
if (len < 0)
|
||||
len = (gssize) strlen (str);
|
||||
result = g_strdup (str);
|
||||
else
|
||||
result = g_strndup (str, (gsize) len);
|
||||
|
||||
result = g_strndup (str, (gsize) len);
|
||||
for (s = result; *s; s++)
|
||||
*s = g_ascii_tolower (*s);
|
||||
|
||||
@ -1585,9 +1586,10 @@ g_ascii_strup (const gchar *str,
|
||||
g_return_val_if_fail (str != NULL, NULL);
|
||||
|
||||
if (len < 0)
|
||||
len = (gssize) strlen (str);
|
||||
result = g_strdup (str);
|
||||
else
|
||||
result = g_strndup (str, (gsize) len);
|
||||
|
||||
result = g_strndup (str, (gsize) len);
|
||||
for (s = result; *s; s++)
|
||||
*s = g_ascii_toupper (*s);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user