|
@@ -498,6 +498,26 @@ const cmChar_t* cmTextLastNonWhiteCharC( const cmChar_t* s )
|
498
|
498
|
{ return cmTextLastNonWhiteChar(s); }
|
499
|
499
|
|
500
|
500
|
|
|
501
|
+cmChar_t* cmTextLastWhiteChar( const cmChar_t* s )
|
|
502
|
+{
|
|
503
|
+ unsigned n;
|
|
504
|
+ if(s==NULL || (n = strlen(s)) == 0 )
|
|
505
|
+ return NULL;
|
|
506
|
+
|
|
507
|
+ cmChar_t* s0 = (cmChar_t*)s + n-1;
|
|
508
|
+
|
|
509
|
+ for(; s0>=s; --s0)
|
|
510
|
+ if( isspace(*s0) )
|
|
511
|
+ return s0;
|
|
512
|
+
|
|
513
|
+ return NULL;
|
|
514
|
+
|
|
515
|
+}
|
|
516
|
+
|
|
517
|
+const cmChar_t* cmTextLastWhiteCharC( const cmChar_t* s )
|
|
518
|
+{ return cmTextLastWhiteChar(s); }
|
|
519
|
+
|
|
520
|
+
|
501
|
521
|
void cmTextShrinkS( cmChar_t* s, const cmChar_t* t, unsigned tn )
|
502
|
522
|
{ cmVOC_Shrink(s,strlen(s)+1,t,tn); }
|
503
|
523
|
|