Index: Source/platform/text/TextBoundaries.cpp |
diff --git a/Source/platform/text/TextBoundaries.cpp b/Source/platform/text/TextBoundaries.cpp |
index ccf3c8bada303ec92e38d65c445697dff93b842d..1b295ca90614f4ceba09d16764f9f541415515b0 100644 |
--- a/Source/platform/text/TextBoundaries.cpp |
+++ b/Source/platform/text/TextBoundaries.cpp |
@@ -99,5 +99,11 @@ void findWordBoundary(const UChar* chars, int len, int position, int* start, int |
*start = it->previous(); |
} |
+int findWordEndBoundary(const UChar* chars, int len, int position) |
+{ |
+ TextBreakIterator* it = wordBreakIterator(chars, len); |
+ int end = it->following(position); |
+ return end < 0 ? it->last() : end; |
+} |
} // namespace blink |