From 10e12f5d8d45ce1dadc97a09c11f9e0f340a79d3 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 14 Feb 2025 11:48:31 +1100 Subject: Implement LastCharacter to return the last character or character fragment in a potentially invalid UTF-8 string. Use this in DiscardLastCombinedCharacter. Place DiscardLastCombinedCharacter in Scintilla::Internal namespace for use in text wrap. --- src/Document.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Document.h') diff --git a/src/Document.h b/src/Document.h index 4e18c42d1..4c6832d89 100644 --- a/src/Document.h +++ b/src/Document.h @@ -273,6 +273,8 @@ struct CharacterExtracted { } }; +bool DiscardLastCombinedCharacter(std::string_view &text) noexcept; + /** */ class Document : PerLine, public Scintilla::IDocument, public Scintilla::ILoader, public Scintilla::IDocumentEditable { -- cgit v1.2.3