shithub: riscv

ref: 88ccea37f65b87312292b2b1a107c39927c6a2c3
dir: /sys/src/cmd/cifs/misc.c/

View raw version
#include <u.h>
#include <libc.h>
#include <ctype.h>

char*
strupr(char *s)
{
	char *p;

	for(p = s; *p; p++)
		if(*p >= 0 && islower(*p))
			*p = toupper(*p);
	return s;
}

char*
strlwr(char *s)
{
	char *p;

	for(p = s; *p; p++)
		if(*p >= 0 && isupper(*p))
			*p = tolower(*p);
	return s;
}