Changeset View
Changeset View
Standalone View
Standalone View
src/core/textbreaks.cpp
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | 69 | while (boundaryFinder.position() < text.length()) { | |||
---|---|---|---|---|---|
80 | if (end == -1) { | 80 | if (end == -1) { | ||
81 | break; | 81 | break; | ||
82 | } | 82 | } | ||
83 | pos.length = end - pos.start; | 83 | pos.length = end - pos.start; | ||
84 | if (pos.length < 1) { | 84 | if (pos.length < 1) { | ||
85 | continue; | 85 | continue; | ||
86 | } | 86 | } | ||
87 | breaks.append(pos); | 87 | breaks.append(pos); | ||
88 | | ||||
89 | if (boundaryFinder.toNextBoundary() == -1) { | | |||
90 | break; | | |||
91 | } | | |||
92 | } | 88 | } | ||
93 | return breaks; | 89 | return breaks; | ||
94 | } | 90 | } | ||
95 | 91 | | |||
96 | TextBreaks::Positions TextBreaks::sentenceBreaks(const QString &text) | 92 | TextBreaks::Positions TextBreaks::sentenceBreaks(const QString &text) | ||
97 | { | 93 | { | ||
98 | Positions breaks; | 94 | Positions breaks; | ||
99 | 95 | | |||
Show All 32 Lines |