diff options
author | Cidorvan Leite <cidorvan.leite@openbossa.org> | 2008-05-07 14:57:35 +0000 |
---|---|---|
committer | Cidorvan Leite <cidorvan.leite@openbossa.org> | 2008-05-07 14:57:35 +0000 |
commit | 4538ab2cc8f6a59a5a4bb987fe89ae361dcf0f60 (patch) | |
tree | af159018745d9216febc5cd6130287bdfabac7de /eglib/gmain.c | |
parent | d6f0804e827a829edb7faef9ddbd53332c1ad8cb (diff) |
Added g_ascii_strup function to eglib
Diffstat (limited to 'eglib/gmain.c')
-rw-r--r-- | eglib/gmain.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/eglib/gmain.c b/eglib/gmain.c index 8071c62b..27b2dd9a 100644 --- a/eglib/gmain.c +++ b/eglib/gmain.c @@ -1479,6 +1479,24 @@ gchar **g_strsplit(const gchar *string, const gchar *delimiter, gint max_tokens) return str_array; } +gchar *g_ascii_strup(const gchar *str, gssize len) +{ + int i; + gchar *s; + + s = g_strdup(str); + if (!s) + return NULL; + + if (len < 0) + len = strlen(s); + + for (i = 0; i < len; i++) + s[i] = toupper(s[i]); + + return s; +} + gboolean g_str_equal(gconstpointer v1, gconstpointer v2) { const gchar *string1 = v1; |