MCPcopy Index your code
hub / github.com/assaultcube/AC / filterlang

Function filterlang

source/src/protocol.cpp:465–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463// ensures, that d is either two lowercase chars or ""
464
465void filterlang(char *d, const char *s)
466{
467 if(strlen(s) == 2)
468 {
469 filtertext(d, s, FTXT_TOLOWER, 2);
470 if(islower(d[0]) && islower(d[1])) return;
471 }
472 *d = '\0';
473}
474
475void filtercountrycode(char *d, const char *s) // returns exactly two uppercase chars or "--"
476{

Callers 2

processFunction · 0.85
main.cppFile · 0.85

Calls 1

filtertextFunction · 0.85

Tested by

no test coverage detected