From d07f81b00b41cf18a47fc70029bc1db85bc8c1a4 Mon Sep 17 00:00:00 2001 From: thilo Date: Wed, 9 Apr 2008 14:37:42 +0000 Subject: Add Multicast capabilities for LAN server scanning. git-svn-id: svn://svn.icculus.org/quake3/trunk@1305 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/qcommon/q_shared.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'code/qcommon/q_shared.c') 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; -- cgit v1.2.3