mirror of
https://github.com/w23/xash3d-fwgs
synced 2024-12-12 20:20:23 +01:00
public: crtlib: add Q_isspace function
This commit is contained in:
parent
7fbbe9f015
commit
ccf90beb7d
@ -725,7 +725,6 @@ typedef int string_t;
|
||||
typedef unsigned short word;
|
||||
|
||||
#include "xash3d_types.h"
|
||||
#define Q_isspace( ch ) (ch < 32 || ch > 255)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -61,6 +61,16 @@ qboolean Q_isdigit( const char *str )
|
||||
return false;
|
||||
}
|
||||
|
||||
qboolean Q_isspace( const char *str )
|
||||
{
|
||||
if( str && *str )
|
||||
{
|
||||
while( isspace( *str ) ) str++;
|
||||
if( !*str ) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t Q_colorstr( const char *string )
|
||||
{
|
||||
size_t len;
|
||||
|
@ -61,6 +61,7 @@ size_t Q_strncat( char *dst, const char *src, size_t siz );
|
||||
size_t Q_strncpy( char *dst, const char *src, size_t siz );
|
||||
uint Q_hashkey( const char *string, uint hashSize, qboolean caseinsensitive );
|
||||
qboolean Q_isdigit( const char *str );
|
||||
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 );
|
||||
|
Loading…
Reference in New Issue
Block a user