Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(572)

Unified Diff: base/i18n/break_iterator.cc

Issue 7458014: Implement Uniscribe RenderText for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add simple BreakIterator support, use scoped_array, fix home/end, invalidate on toggle insert, etc. Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/i18n/break_iterator.cc
diff --git a/base/i18n/break_iterator.cc b/base/i18n/break_iterator.cc
index afa1fd80d89b080a97a0585351b1be0b6daacd71..cd22707520a3001e79183864a507ffc0727afa75 100644
--- a/base/i18n/break_iterator.cc
+++ b/base/i18n/break_iterator.cc
@@ -92,6 +92,12 @@ bool BreakIterator::IsWord() const {
return (break_type_ == BREAK_WORD && status != UBRK_WORD_NONE);
}
+bool BreakIterator::IsBreak(size_t position) {
+ UBool boundary = ubrk_isBoundary(static_cast<UBreakIterator*>(iter_),
+ static_cast<int32_t>(position));
+ return !!boundary;
+}
+
string16 BreakIterator::GetString() const {
DCHECK(prev_ != npos && pos_ != npos);
return string_.substr(prev_, pos_ - prev_);

Powered by Google App Engine
This is Rietveld 408576698