| 193 | } |
| 194 | |
| 195 | int strncmp(const char* str1, const char* str2, size_t n) |
| 196 | { |
| 197 | const u8* p1 = (u8*)str1 - 1; |
| 198 | const u8* p2 = (u8*)str2 - 1; |
| 199 | u32 c1, c2; |
| 200 | |
| 201 | n++; |
| 202 | |
| 203 | while (--n) |
| 204 | if ((c1 = *++p1) != (c2 = *++p2)) |
| 205 | return (c1 - c2); |
| 206 | else if (!c1) |
| 207 | break; |
| 208 | return 0; |
| 209 | } |
| 210 | |
| 211 | char* strchr(const char* str, int chr) |
| 212 | { |
no outgoing calls
no test coverage detected