blob: 1d12ba5b46a46c108d025f50e1fcd76e168b4888 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--- code/qcommon/q_shared.c.orig 2011-12-24 12:29:31 UTC
+++ code/qcommon/q_shared.c
@@ -96,6 +96,30 @@ void COM_StripExtension( const char *in,
out[length] = 0;
}
+/*
+============
+COM_CompareExtension
+
+string compare the end of the strings and return qtrue if strings match
+============
+*/
+qboolean COM_CompareExtension(const char *in, const char *ext)
+{
+ int inlen, extlen;
+
+ inlen = strlen(in);
+ extlen = strlen(ext);
+
+ if(extlen <= inlen)
+ {
+ in += inlen - extlen;
+
+ if(!Q_stricmp(in, ext))
+ return qtrue;
+ }
+
+ return qfalse;
+}
/*
==================
|