diff options
author | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-01-17 17:30:23 +0000 |
---|---|---|
committer | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-01-17 17:30:23 +0000 |
commit | 6b7787e2cd5168bcb4e3ca12ce593db5a33f89ec (patch) | |
tree | 57c2b98b02ccfe8ee62356881770925f85814aa6 /wsutil | |
parent | 26058b92bc7952b1026e07f88811c286edd508bd (diff) |
Revise ascii...inplace to return a ptr to the string
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27253 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/str_util.c | 8 | ||||
-rw-r--r-- | wsutil/str_util.h | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/wsutil/str_util.c b/wsutil/str_util.c index 4b01956d28..e94fec9046 100644 --- a/wsutil/str_util.c +++ b/wsutil/str_util.c @@ -30,21 +30,25 @@ #include "str_util.h" /* Convert all ASCII letters to lower case, in place. */ -void +gchar * ascii_strdown_inplace(gchar *str) { gchar *s; for (s = str; *s; s++) *s = g_ascii_tolower (*s); + + return (str); } /* Convert all ASCII letters to upper case, in place. */ -void +gchar * ascii_strup_inplace(gchar *str) { gchar *s; for (s = str; *s; s++) *s = g_ascii_toupper (*s); + + return (str); } diff --git a/wsutil/str_util.h b/wsutil/str_util.h index 432e970e38..cbc6f2bad5 100644 --- a/wsutil/str_util.h +++ b/wsutil/str_util.h @@ -38,8 +38,9 @@ * the range 0x80 through 0xFF. * * @param str The string to be lower-cased. + * @return ptr to the string */ -void ascii_strdown_inplace(gchar *str); +gchar *ascii_strdown_inplace(gchar *str); /** Convert all lower-case ASCII letters to their ASCII upper-case * equivalents, in place, with a simple non-locale-dependent @@ -54,7 +55,8 @@ void ascii_strdown_inplace(gchar *str); * the range 0x80 through 0xFF. * * @param str The string to be upper-cased. + * @return ptr to the string */ -void ascii_strup_inplace(gchar *str); +gchar *ascii_strup_inplace(gchar *str); #endif /* __STR_UTIL_H__ */ |