diff --git a/cmText.c b/cmText.c index d2c9d2c..478b962 100644 --- a/cmText.c +++ b/cmText.c @@ -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); diff --git a/cmText.h b/cmText.h index 3e4d521..72a918e 100644 --- a/cmText.h +++ b/cmText.h @@ -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.