|
@@ -52,6 +52,8 @@ extern "C" {
|
52
|
52
|
cmChar_t* cmTextSysVPrintf( cmTextSysH_t h, const cmChar_t* fmt, va_list vl );
|
53
|
53
|
cmChar_t* cmTextSysPrintf( cmTextSysH_t h, const cmChar_t* fmt, ... );
|
54
|
54
|
void cmTextSysFreeStr( cmTextSysH_t h, const cmChar_t* s );
|
|
55
|
+ // Return true if 's' is stored in the text systems internal heap,
|
|
56
|
+ bool cmTextSysIsStored(cmTextSysH_t h, const cmChar_t* s );
|
55
|
57
|
|
56
|
58
|
//
|
57
|
59
|
// Global interface:
|
|
@@ -71,6 +73,7 @@ extern "C" {
|
71
|
73
|
cmChar_t* cmTsVPrintf( const cmChar_t* fmt, va_list vl );
|
72
|
74
|
cmChar_t* cmTsPrintf( const cmChar_t* fmt, ... );
|
73
|
75
|
void cmTsFreeStr( const cmChar_t* s );
|
|
76
|
+ bool cmTsIsStored(const cmChar_t* s );
|
74
|
77
|
|
75
|
78
|
// Print a formatted string into s[]. s[] is reallocated as necessary to
|
76
|
79
|
// hold the string. s must be freed by the caller via cmMemFree().
|
|
@@ -196,6 +199,10 @@ extern "C" {
|
196
|
199
|
bool cmTextIsEmpty( const cmChar_t* s );
|
197
|
200
|
bool cmTextIsNotEmpty( const cmChar_t* s );
|
198
|
201
|
|
|
202
|
+ // Same as strcmp() but handles NULL. Note that if both s0 and s1 are NULL
|
|
203
|
+ // then return is 0.
|
|
204
|
+ int cmTextCmp( const cmChar_t* s0, const cmChar_t* s1 );
|
|
205
|
+
|
199
|
206
|
// Returns NULL if string contains fewer than lineIdx lines.
|
200
|
207
|
// Note: first line == 1.
|
201
|
208
|
cmChar_t* cmTextLine( cmChar_t* s, unsigned line );
|