version 1.2 | | version 1.3 |
---|
| | |
* string manipulation utility code | | * string manipulation utility code |
* | | * |
* $Log$ | | * $Log$ |
| | * Revision 1.3 1999/10/17 23:15:23 donut |
| | * made str(n)icmp have const args |
| | * |
* Revision 1.2 1999/10/14 04:48:21 donut | | * Revision 1.2 1999/10/14 04:48:21 donut |
* alpha fixes, and gl_font args | | * alpha fixes, and gl_font args |
* | | * |
| | |
| | |
| | |
#ifdef _MSC_VER | | #ifdef _MSC_VER |
#include <string.h> | | |
int strcasecmp( char *s1, char *s2 ) | | int strcasecmp( char *s1, char *s2 ) |
{ return _stricmp(s1,s2); } | | { return _stricmp(s1,s2); } |
| | |
| | |
| | |
#define strcmpi(a,b) stricmp(a,b) | | #define strcmpi(a,b) stricmp(a,b) |
| | |
int stricmp( char *s1, char *s2 ) | | int stricmp( const char *s1, const char *s2 ) |
{ | | { |
while( *s1 && *s2 ) { | | while( *s1 && *s2 ) { |
if ( tolower(*s1) != tolower(*s2) ) return 1; | | if ( tolower(*s1) != tolower(*s2) ) return 1; |
| | |
| | |
#ifndef __LCC__ | | #ifndef __LCC__ |
| | |
int strnicmp( char *s1, char *s2, int n ) | | int strnicmp( const char *s1, const char *s2, int n ) |
{ | | { |
while( *s1 && *s2 && n) { | | while( *s1 && *s2 && n) { |
if ( tolower(*s1) != tolower(*s2) ) return 1; | | if ( tolower(*s1) != tolower(*s2) ) return 1; |