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

Function str_escape

src/base/str.cpp:834–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

832}
833
834void str_escape(char **dst, const char *src, const char *end)
835{
836 while(*src && *dst + 1 < end)
837 {
838 if(*src == '"' || *src == '\\') // escape \ and "
839 {
840 if(*dst + 2 < end)
841 *(*dst)++ = '\\';
842 else
843 break;
844 }
845 *(*dst)++ = *src++;
846 }
847 **dst = 0;
848}
849
850int str_toint(const char *str)
851{

Callers 11

RenderPopupFullscreenMethod · 0.85
CallvoteOptionMethod · 0.85
RemovevoteOptionMethod · 0.85
AddvoteOptionMethod · 0.85
RenderMethod · 0.85
GetKeyBindCommandMethod · 0.85
OnInputMethod · 0.85
ConAddMapVotesMethod · 0.85
ConVotesMethod · 0.85
ConfigSaveCallbackMethod · 0.85
EscapeParamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected