ladybird/LibC/ctype.cpp
2019-02-26 15:57:59 +01:00

16 lines
230 B
C++

#include <ctype.h>
#include <string.h>
int __tolower(int c)
{
if (c >= 'A' && c <= 'Z')
return c | 0x20;
return c;
}
int __toupper(int c)
{
if (c >= 'a' && c <= 'z')
return c & ~0x20;
return c;
}