mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-10 23:27:53 +00:00
public: remove custom str(r)chr functions
This commit is contained in:
parent
402b38951d
commit
ab6214142f
@ -317,32 +317,6 @@ void Q_atov( float *vec, const char *str, size_t siz )
|
||||
}
|
||||
}
|
||||
|
||||
char *Q_strchr( const char *s, char c )
|
||||
{
|
||||
size_t len = Q_strlen( s );
|
||||
|
||||
while( len-- )
|
||||
{
|
||||
if( *++s == c )
|
||||
return (char *)s;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *Q_strrchr( const char *s, char c )
|
||||
{
|
||||
size_t len = Q_strlen( s );
|
||||
|
||||
s += len;
|
||||
|
||||
while( len-- )
|
||||
{
|
||||
if( *--s == c )
|
||||
return (char *)s;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Q_strnicmp( const char *s1, const char *s2, int n )
|
||||
{
|
||||
int c1, c2;
|
||||
|
@ -58,8 +58,8 @@ qboolean Q_isspace( const char *str );
|
||||
int Q_atoi( const char *str );
|
||||
float Q_atof( const char *str );
|
||||
void Q_atov( float *vec, const char *str, size_t siz );
|
||||
char *Q_strchr( const char *s, char c );
|
||||
char *Q_strrchr( const char *s, char c );
|
||||
#define Q_strchr strchr
|
||||
#define Q_strrchr strrchr
|
||||
#define Q_stricmp( s1, s2 ) Q_strnicmp( s1, s2, 99999 )
|
||||
int Q_strnicmp( const char *s1, const char *s2, int n );
|
||||
#define Q_strcmp( s1, s2 ) Q_strncmp( s1, s2, 99999 )
|
||||
|
Loading…
Reference in New Issue
Block a user