Convert the characters in a string to upper case or lower case
char *strupr(char *string)
{
if (NULL == string)
return NULL;
char *s;
for (s = string; *s; ++s)
{
if (*s >= 'a' && *s <= 'z')
{
*s = toupper(*s);
}
}
return string;
}
char *strlwr(char *string)
{
if (NULL == string)
return NULL;
char *s;
for (s = string; *s; ++s)
*s = tolower(*s);
return string;
}