MCPcopy Create free account
hub / github.com/coreboot/coreboot / strtok

Function strtok

payloads/libpayload/libc/string.c:544–549  ·  view source on GitHub ↗

* Extract first token in string str that is delimited by a character in tokens. * Destroys str, eliminates the token delimiter and uses global state. * @param str A pointer to the string to tokenize. * @param delim A pointer to an array of characters that delimit the token * @return Pointer to token */

Source from the content-addressed store, hash-verified

542 * @return Pointer to token
543 */
544char *strtok(char *str, const char *delim)
545{
546 static char *strtok_ptr;
547
548 return strtok_r(str, delim, &strtok_ptr);
549}
550
551/* errno isn't actually used anywhere other than perror() below, and just here
552 for compatibility with libc-targeting code wanting to incidentally print it. */

Callers

nothing calls this directly

Calls 1

strtok_rFunction · 0.70

Tested by

no test coverage detected