Lines Matching defs:begin
113 static const char* align_utf8(const char* p, const char* begin) {
114 while (p > begin && is_utf8_continuation(*p)) {
120 static const char* prev_utf8(const char* p, const char* begin) {
121 return p > begin ? align_utf8(p - 1, begin) : begin;
164 std::vector<TextLine>::const_iterator next = fLines.begin() + pos.fParagraphIndex + 1;
167 readlines(src.begin(), src.size(), [&line](const char* str, size_t l) {
195 fLines[end.fParagraphIndex].fText.begin() + end.fTextByteIndex,
198 fLines.erase(fLines.begin() + start.fParagraphIndex + 1,
199 fLines.begin() + end.fParagraphIndex + 1);
225 append(&dst, &size, str.begin() + start.fTextByteIndex,
230 const std::vector<TextLine>::const_iterator firstP = fLines.begin() + start.fParagraphIndex;
231 const std::vector<TextLine>::const_iterator lastP = fLines.begin() + end.fParagraphIndex;
235 append(&dst, &size, first.begin() + start.fTextByteIndex, first.size() - start.fTextByteIndex);
238 append(&dst, &size, line->fText.begin(), line->fText.size());
241 append(&dst, &size, last.begin(), end.fTextByteIndex);
245 static inline const char* begin(const StringSlice& s) { return s.begin(); }
253 return align_utf8(begin(str) + p, begin(str)) - begin(str);
260 return (size_t)(std::upper_bound(list.begin(), list.end(), value) - list.begin());
296 !is_utf8_continuation(fLines[pos.fParagraphIndex].fText.begin()[pos.fTextByteIndex]));
310 prev_utf8(begin(str) + pos.fTextByteIndex, begin(str)) - begin(str);
322 next_utf8(begin(str) + pos.fTextByteIndex, end(str)) - begin(str);
473 ShapeResult result = Shape(line.fText.begin(), line.fText.size(),
491 ShapeResult result = Shape(line.fText.begin(), line.fText.size(),