blob: 807eb38c5810301bbb6975fa072843db4afdc1d9 (
plain) (
tree)
|
|
#include "string.h"
int
toupper(int c)
{
if(c >= 'a' && c <= 'z')
c -= ('a' - 'A');
return c;
}
char*
stoupper(char *s)
{
char *o = s;
for(; *s != 0; s++)
*s = toupper(*s);
return o;
}
char*
sntoupper(char *s, size_t limit)
{
for(size_t i = 0; i < limit; i++)
s[i] = toupper(s[i]);
return s;
}
|