minor modification of strtolower(), and implement strtoupper()

This commit is contained in:
rlar
2010-11-04 20:01:46 +00:00
parent 3afbeb53e2
commit 2cdd98715a
3 changed files with 22 additions and 4 deletions
+16 -4
View File
@@ -132,10 +132,22 @@ void
strtolower(char *str)
{
if (str)
while (*str) {
*str = tolower(*str);
str++;
}
while (*str) {
if(isupper(*str))
*str = (char) tolower(*str);
str++;
}
}
void
strtoupper(char *str)
{
if (str)
while (*str) {
if(islower(*str))
*str = (char) toupper(*str);
str++;
}
}
#ifdef CIDER