MCPcopy Create free account
hub / github.com/assaultcube/AC / hiddenpwd

Function hiddenpwd

source/src/tools.cpp:618–626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

616}
617
618const char *hiddenpwd(const char *pwd, int showchars)
619{
620 static int sc = 3;
621 static string text;
622 copystring(text, pwd);
623 if(showchars > 0) sc = showchars;
624 for(int i = (int)strlen(text) - 1; i >= sc; i--) text[i] = '*';
625 return text;
626}
627
628int getlistindex(const char *key, const char *list[], bool acceptnumeric, int deflt)
629{

Callers 3

enumeratektFunction · 0.85
readMethod · 0.85
initserverFunction · 0.85

Calls 1

copystringFunction · 0.85

Tested by

no test coverage detected