toupper.c 156 B

12345678910111213141516
  1. toupper(int c)
  2. {
  3. if(c < 'a' || c > 'z')
  4. return c;
  5. return (c-'a'+'A');
  6. }
  7. tolower(int c)
  8. {
  9. if(c < 'A' || c > 'Z')
  10. return c;
  11. return (c-'A'+'a');
  12. }