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

Function str_next_token

src/base/str.cpp:501–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499}
500
501const char *str_next_token(const char *str, const char *delim, char *buffer, int buffer_size)
502{
503 int len = 0;
504 const char *tok = str_token_get(str, delim, &len);
505 if(len < 0 || tok == nullptr)
506 {
507 buffer[0] = '\0';
508 return nullptr;
509 }
510
511 len = buffer_size > len ? len : buffer_size - 1;
512 mem_copy(buffer, tok, len);
513 buffer[len] = '\0';
514
515 return tok + len;
516}
517
518int str_in_list(const char *list, const char *delim, const char *needle)
519{

Callers 14

LoadIndexfileMethod · 0.85
PrintHighlightedMethod · 0.85
DoBroadcastMethod · 0.85
RenderNewsMethod · 0.85
DoImportantAlertMethod · 0.85
GetBindSlotMethod · 0.85
CheckCollisionMethod · 0.85
OnDemoPlayerMessageMethod · 0.85
ConnectMethod · 0.85
FilterMethod · 0.85
OnConfigChangeMethod · 0.85

Calls 2

str_token_getFunction · 0.85
mem_copyFunction · 0.85

Tested by 1

TESTFunction · 0.68