string.c 271 B

12345678910111213141516
  1. #include <ctype.h>
  2. #include <string.h>
  3. char* strupr(char* s) {
  4. char* d;
  5. for (d = s; *d; ++d)
  6. *d = (char)toupper((int)*d);
  7. return s;
  8. }
  9. char* strlwr(char* s) {
  10. char* d;
  11. for (d = s; *d; ++d)
  12. *d = (char)tolower((int)*d);
  13. return s;
  14. }