Return the string length without the markup
| 205 | |
| 206 | // Return the string length without the markup |
| 207 | inline int ConsoleColor_StringLength( const char *pText ) |
| 208 | { |
| 209 | const char *pSrc = pText; |
| 210 | /* */ int nLen = 0; |
| 211 | |
| 212 | if ( pText ) |
| 213 | { |
| 214 | while ( *pSrc ) |
| 215 | { |
| 216 | if ( ConsoleColor_IsCharMeta( *pSrc ) ) |
| 217 | pSrc++; |
| 218 | else |
| 219 | nLen++; |
| 220 | pSrc++; |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | return nLen; |
| 225 | } |
| 226 | |
| 227 | // Globals __________________________________________________________________ |
| 228 |
no test coverage detected