| 139 | } |
| 140 | |
| 141 | int strncmp(const char* s1, const char* s2, size_t n) |
| 142 | { |
| 143 | for (size_t i = 0; i < n; i++) |
| 144 | { |
| 145 | if (s1[i] != s2[i]) |
| 146 | return s1[i] < s2[i] ? -1 : 1; |
| 147 | else if (s1[i] == '\0') |
| 148 | return 0; |
| 149 | } |
| 150 | |
| 151 | return 0; |
| 152 | } |
| 153 | |
| 154 | // strchr - Get pointer to first occurance of c in string s |
| 155 | char* strchr(const char *s, int c) |
no outgoing calls
no test coverage detected