diff options
Diffstat (limited to 'sys/base/string/lower.c')
-rw-r--r-- | sys/base/string/lower.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/base/string/lower.c b/sys/base/string/lower.c new file mode 100644 index 0000000..c6935f8 --- /dev/null +++ b/sys/base/string/lower.c @@ -0,0 +1,12 @@ +#include "internal.h" + +// lower will force all runes in the string to be lowercase +void +str·lower(string s) +{ + byte *b, *e; + b = s; + e = b + str·len(s); + while (b++ != e) + *b = tolower(*b); +} |