| 354 | extern bool BadUTF(const char *s, int len, int &trailBytes); |
| 355 | |
| 356 | static int NextBadU(const char *s, int p, int len, int &trailBytes) { |
| 357 | while (p < len) { |
| 358 | p++; |
| 359 | if (BadUTF(s + p, len - p, trailBytes)) |
| 360 | return p; |
| 361 | } |
| 362 | return -1; |
| 363 | } |
| 364 | |
| 365 | BreakFinder::BreakFinder(LineLayout *ll_, int lineStart_, int lineEnd_, int posLineStart_, |
| 366 | int xStart, bool breakForSelection, Document *pdoc_) : |