MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Com_SkipTokens

Function Com_SkipTokens

code/qcommon/q_shared.cpp:955–973  ·  view source on GitHub ↗

================== Com_SkipTokens ================== */

Source from the content-addressed store, hash-verified

953==================
954*/
955char *Com_SkipTokens( char *s, int numTokens, char *sep ) {
956 int sepCount = 0;
957 char *p = s;
958
959 while ( sepCount < numTokens ) {
960 if ( Com_CharIsOneOfCharset( *p++, sep ) ) {
961 sepCount++;
962 while ( Com_CharIsOneOfCharset( *p, sep ) )
963 p++;
964 }
965 else if ( *p == '\0' )
966 break;
967 }
968
969 if ( sepCount == numTokens )
970 return p;
971 else
972 return s;
973}
974
975
976/*

Callers 3

Cvar_CompleteCvarNameFunction · 0.70
Key_CompleteUnbindFunction · 0.50
Key_CompleteBindFunction · 0.50

Calls 1

Com_CharIsOneOfCharsetFunction · 0.70

Tested by

no test coverage detected