MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / strtok

Function strtok

Kernel/src/string.cpp:195–208  ·  view source on GitHub ↗

strtok - breaks str into tokens using specified delimiters

Source from the content-addressed store, hash-verified

193
194// strtok - breaks str into tokens using specified delimiters
195char *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
210char* strcat(char* dest, const char* src){
211 strcpy(dest + strlen(dest), src);

Callers 5

ParseLineFunction · 0.85
InitCoreFunction · 0.85
MakeNodeMethod · 0.85
ResolvePathFunction · 0.85
CanonicalizePathFunction · 0.85

Calls 2

strspnFunction · 0.85
strcspnFunction · 0.85

Tested by

no test coverage detected