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

Function str_find

src/base/str.cpp:468–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468const char *str_find(const char *haystack, const char *needle)
469{
470 while(*haystack) /* native implementation */
471 {
472 const char *a = haystack;
473 const char *b = needle;
474 while(*a && *b && *a == *b)
475 {
476 a++;
477 b++;
478 }
479 if(!(*b))
480 return haystack;
481 haystack++;
482 }
483
484 return nullptr;
485}
486
487static const char *str_token_get(const char *str, const char *delim, int *length)
488{

Callers 15

GetGameInfoFunction · 0.85
TimeFromStrMethod · 0.85
TimeFromFinishMessageMethod · 0.85
OnStateChangeMethod · 0.85
OnMessageMethod · 0.85
ReplaceCommataMethod · 0.85
StrCopyUntilSpaceFunction · 0.85
GetBindSlotMethod · 0.85
OnInputMethod · 0.85
StoreSaveMethod · 0.85
RunServerMethod · 0.85
CheckCollisionMethod · 0.85

Calls

no outgoing calls

Tested by 1

IsValidEditorTooltipFunction · 0.68