| 150 | |
| 151 | |
| 152 | int cString::CountNumWords() const |
| 153 | { |
| 154 | int num_words = 0; |
| 155 | int pos = CountWhitespace(); // Skip initial whitespace. |
| 156 | while( pos<GetSize() ) { |
| 157 | pos += CountWordsize(pos); |
| 158 | pos += CountWhitespace(pos); |
| 159 | num_words++; |
| 160 | } |
| 161 | return num_words; |
| 162 | } |
| 163 | |
| 164 | |
| 165 | // -- Search -- |
no outgoing calls
no test coverage detected