We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b2a5f9 commit c46cf51Copy full SHA for c46cf51
1 file changed
src/string.c
@@ -26,14 +26,29 @@
26
#include <stddef.h>
27
#include <string.h>
28
29
+int islower(int c)
30
+{
31
+ return (c >= 'a' && c <= 'z');
32
+}
33
+
34
int isupper(int c)
35
{
36
return (c >= 'A' && c <= 'Z');
37
}
38
39
int tolower(int c)
40
- return isupper(c) ? (c) - 'A' + 'a' : c;
41
+ return isupper(c) ? c - 'A' + 'a' : c;
42
43
44
+int toupper(int c)
45
46
+ return islower(c) ? c - 'a' + 'A' : c;
47
48
49
+int isalpha(int c)
50
51
+ return (isupper(c) || islower(c));
52
53
54
void *memset(void *s, int c, size_t n)
0 commit comments