diff options
Diffstat (limited to 'code/qcommon/q_shared.c')
-rw-r--r-- | code/qcommon/q_shared.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/code/qcommon/q_shared.c b/code/qcommon/q_shared.c index 18b71d3..1bc8076 100644 --- a/code/qcommon/q_shared.c +++ b/code/qcommon/q_shared.c @@ -921,6 +921,18 @@ char *Q_CleanStr( char *string ) { return string; } +int Q_CountChar(const char *string, char tocount) +{ + int count; + + for(count = 0; *string; string++) + { + if(*string == tocount) + count++; + } + + return count; +} void QDECL Com_sprintf( char *dest, int size, const char *fmt, ...) { int len; |