| 184 | } |
| 185 | |
| 186 | int UNICHAR::const_iterator::utf8_len() const { |
| 187 | ASSERT_HOST(it_ != NULL); |
| 188 | const int len = utf8_step(it_); |
| 189 | if (len == 0) { |
| 190 | tprintf("WARNING: Illegal UTF8 encountered\n"); |
| 191 | return 1; |
| 192 | } |
| 193 | return len; |
| 194 | } |
| 195 | |
| 196 | bool UNICHAR::const_iterator::is_legal() const { |
| 197 | return utf8_step(it_) > 0; |