cmText.h/c: Added cmTextIsNotEmpty()

This commit is contained in:
kevin 2013-04-11 00:26:33 -07:00
parent bdfc4f6c8d
commit c144c71349
2 changed files with 6 additions and 1 deletions

View File

@ -611,6 +611,10 @@ bool cmTextIsEmpty( const cmChar_t* s )
return true;
}
bool cmTextIsNotEmpty( const cmChar_t* s )
{ return !cmTextIsEmpty(s); }
cmChar_t* cmTextLine( cmChar_t* s, unsigned line )
{
assert( line>0);

View File

@ -192,8 +192,9 @@ extern "C" {
// Append 'n' copies of 'c' to the end of s[].
cmChar_t* cmTextAppendChar( cmChar_t* s, cmChar_t c, unsigned n );
// Returns true if the string is all spaces.
// Returns true if the string is NULL or all spaces.
bool cmTextIsEmpty( const cmChar_t* s );
bool cmTextIsNotEmpty( const cmChar_t* s );
// Returns NULL if string contains fewer than lineIdx lines.
// Note: first line == 1.