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

Function COM_CompareExtension

code/qcommon/q_shared.cpp:86–102  ·  view source on GitHub ↗

============ COM_CompareExtension string compare the end of the strings and return qtrue if strings match ============ */

Source from the content-addressed store, hash-verified

84============
85*/
86qboolean COM_CompareExtension(const char *in, const char *ext)
87{
88 int inlen, extlen;
89
90 inlen = strlen(in);
91 extlen = strlen(ext);
92
93 if(extlen <= inlen)
94 {
95 in += inlen - extlen;
96
97 if(!Q_stricmp(in, ext))
98 return qtrue;
99 }
100
101 return qfalse;
102}
103
104/*
105==================

Callers 4

Com_WriteConfig_fFunction · 0.70
Con_Dump_fFunction · 0.50
RE_RegisterModelFunction · 0.50

Calls 1

Q_stricmpFunction · 0.85

Tested by

no test coverage detected