diff options
author | Bill Meier <wmeier@newsguy.com> | 2009-01-17 17:30:23 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2009-01-17 17:30:23 +0000 |
commit | 0147b08a4e3e4e7d9b2957c6e4058fc914bd4d09 (patch) | |
tree | 57c2b98b02ccfe8ee62356881770925f85814aa6 | |
parent | 414d042d2e95e00840729f35fc66f66b0c6c5da5 (diff) | |
download | wireshark-0147b08a4e3e4e7d9b2957c6e4058fc914bd4d09.tar.gz |
Revise ascii...inplace to return a ptr to the string
svn path=/trunk/; revision=27253
-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__ */ |