cwText.h/cpp : Added textIsEqual(), textIsNotEqual().
This commit is contained in:
parent
10e6cac8d1
commit
5afd37c259
@ -70,10 +70,6 @@ int cw::textCompare( const char* s0, const char* s1, unsigned n)
|
||||
return strncmp(s0,s1,n);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const char* cw::nextWhiteChar( const char* s )
|
||||
{ return _nextWhiteChar(s,false); }
|
||||
|
||||
|
6
cwText.h
6
cwText.h
@ -10,7 +10,13 @@ namespace cw
|
||||
// if both s0 and s1 are nullptr then a match is indicated
|
||||
int textCompare( const char* s0, const char* s1 );
|
||||
int textCompare( const char* s0, const char* s1, unsigned n);
|
||||
|
||||
inline bool textIsEqual( const char* s0, const char* s1 ) { return textCompare(s0,s1) == 0; }
|
||||
inline bool textIsEqual( const char* s0, const char* s1, unsigned n ) { return textCompare(s0,s1,n) == 0; }
|
||||
|
||||
inline bool textIsNotEqual( const char* s0, const char* s1 ) { return !textIsEqual(s0,s1); }
|
||||
inline bool textIsNotEqual( const char* s0, const char* s1, unsigned n ) { return !textIsEqual(s0,s1,n); }
|
||||
|
||||
// Return a pointer to the next white space char
|
||||
// or nullptr if 's' is null are there are no whitespace char's.
|
||||
const char* nextWhiteChar( const char* s );
|
||||
|
Loading…
Reference in New Issue
Block a user