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

Function str_startswith

src/base/str.cpp:396–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394}
395
396const char *str_startswith(const char *str, const char *prefix)
397{
398 int prefixl = str_length(prefix);
399 if(str_comp_num(str, prefix, prefixl) == 0)
400 {
401 return str + prefixl;
402 }
403 else
404 {
405 return nullptr;
406 }
407}
408
409const char *str_endswith_nocase(const char *str, const char *suffix)
410{

Callers 15

LoadIndexfileMethod · 0.85
GetGameInfoFunction · 0.85
IsSpecialSkinMethod · 0.85
CChatMethod · 0.85
OnPrepareLinesMethod · 0.85
LoadCurrentMapMethod · 0.85
IsValidSaveFilenameMethod · 0.85
LoadMethod · 0.85
TestMapLocallyMethod · 0.85
OnFinishMethod · 0.85

Calls 2

str_lengthFunction · 0.85
str_comp_numFunction · 0.85

Tested by 2

TestMapLocallyMethod · 0.68
TESTFunction · 0.68