Преглед на файлове

cmText.h/c: Added cmTextIsNotEmpty()

master
kevin преди 11 години
родител
ревизия
c144c71349
променени са 2 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 4
    0
      cmText.c
  2. 2
    1
      cmText.h

+ 4
- 0
cmText.c Целия файл

@@ -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 Целия файл

@@ -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…
Отказ
Запис