MCPcopy Create free account
hub / github.com/ddnet/ddnet / str_token_get

Function str_token_get

src/base/str.cpp:487–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487static const char *str_token_get(const char *str, const char *delim, int *length)
488{
489 size_t len = strspn(str, delim);
490 if(len > 1)
491 str++;
492 else
493 str += len;
494 if(!*str)
495 return nullptr;
496
497 *length = strcspn(str, delim);
498 return str;
499}
500
501const char *str_next_token(const char *str, const char *delim, char *buffer, int buffer_size)
502{

Callers 2

str_next_tokenFunction · 0.85
str_in_listFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected