Browse Source

cmText.h/c: Added cmTextIsNotEmpty()

master
kevin 11 years ago
parent
commit
c144c71349
2 changed files with 6 additions and 1 deletions
  1. 4
    0
      cmText.c
  2. 2
    1
      cmText.h

+ 4
- 0
cmText.c View File

@@ -611,6 +611,10 @@ bool cmTextIsEmpty( const cmChar_t* s )
611 611
   return true;
612 612
 }
613 613
 
614
+bool cmTextIsNotEmpty( const cmChar_t* s )
615
+{ return !cmTextIsEmpty(s); }
616
+
617
+
614 618
 cmChar_t* cmTextLine( cmChar_t* s, unsigned line )
615 619
 {
616 620
   assert( line>0);

+ 2
- 1
cmText.h View File

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

Loading…
Cancel
Save