瀏覽代碼

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
   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 查看文件

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.

Loading…
取消
儲存