strtok - breaks str into tokens using specified delimiters
| 193 | |
| 194 | // strtok - breaks str into tokens using specified delimiters |
| 195 | char *strtok(char * str, const char * delim) |
| 196 | { |
| 197 | static char* p = 0; |
| 198 | if (str) |
| 199 | p = str; |
| 200 | else if (!p) |
| 201 | return 0; |
| 202 | str = p + strspn(p, delim); |
| 203 | p = str + strcspn(str, delim); |
| 204 | if (p == str) |
| 205 | return p = 0; |
| 206 | p = *p ? *p = 0, p + 1 : 0; |
| 207 | return str; |
| 208 | } |
| 209 | |
| 210 | char* strcat(char* dest, const char* src){ |
| 211 | strcpy(dest + strlen(dest), src); |
no test coverage detected