| 245 | } |
| 246 | |
| 247 | int PrevTextElementPos(const char* text, int pos, int langID) |
| 248 | { |
| 249 | if (!text) |
| 250 | return pos; |
| 251 | if (pos <= 0) |
| 252 | return 0; |
| 253 | |
| 254 | int i = pos - 1; |
| 255 | while (i > 0 && IsUtf8ContinuationByte(static_cast<unsigned char>(text[i]))) |
| 256 | --i; |
| 257 | return i; |
| 258 | } |
| 259 | |
| 260 | int CountTextElements(const char* text, int langID) |
| 261 | { |
no test coverage detected