From 9975609bf3b39f0e1cd121995ac49aea30a6c48f Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Thu, 21 Oct 2021 22:15:57 +1100 Subject: Feature [feature-requests:#1417] Use backward iteration to find space / control character and text / punctuation boundaries in SafeSegment as will be simpler and faster in almost all cases. Simplify BreakFinder::Next calling SafeSegment. --- src/Document.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Document.h') diff --git a/src/Document.h b/src/Document.h index 897a1270c..e406118a7 100644 --- a/src/Document.h +++ b/src/Document.h @@ -352,7 +352,7 @@ public: bool IsDBCSTrailByteNoExcept(char ch) const noexcept; int DBCSDrawBytes(std::string_view text) const noexcept; bool IsDBCSDualByteAt(Sci::Position pos) const noexcept; - int SafeSegment(const char *text, int lengthSegment) const noexcept; + size_t SafeSegment(std::string_view text) const noexcept; EncodingFamily CodePageFamily() const noexcept; // Gateways to modifying document -- cgit v1.2.3