Pārlūkot izejas kodu

cmText.h/c: Added cmTextIsNotEmpty()

master
kevin 11 gadus atpakaļ
vecāks
revīzija
c144c71349
2 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  1. 4
    0
      cmText.c
  2. 2
    1
      cmText.h

+ 4
- 0
cmText.c Parādīt failu

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

+ 2
- 1
cmText.h Parādīt failu

192
   // Append 'n' copies of 'c' to the end of s[].
192
   // Append 'n' copies of 'c' to the end of s[].
193
   cmChar_t* cmTextAppendChar( cmChar_t* s, cmChar_t c, unsigned n );
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
   bool cmTextIsEmpty( const cmChar_t* s );
196
   bool cmTextIsEmpty( const cmChar_t* s );
197
+  bool cmTextIsNotEmpty( const cmChar_t* s );
197
 
198
 
198
   // Returns NULL if string contains fewer than lineIdx lines.
199
   // Returns NULL if string contains fewer than lineIdx lines.
199
   // Note: first line == 1.
200
   // Note: first line == 1.

Notiek ielāde…
Atcelt
Saglabāt