From 94b85e1fad1ca53b56fa1e1d41c5627849603b27 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 20 May 2002 07:34:07 +0000 Subject: Added a Match method to Accessor to make it easy to check for strings in a document. Moved IsASpaceOrTab into StyleContext header. --- src/WindowAccessor.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/WindowAccessor.cxx') diff --git a/src/WindowAccessor.cxx b/src/WindowAccessor.cxx index e02bf90e4..e980b9a77 100644 --- a/src/WindowAccessor.cxx +++ b/src/WindowAccessor.cxx @@ -45,6 +45,15 @@ void WindowAccessor::Fill(int position) { Platform::SendScintilla(id, SCI_GETTEXTRANGE, 0, reinterpret_cast(&tr)); } +bool WindowAccessor::Match(int pos, const char *s) { + for (int i=0; *s; i++) { + if (*s != SafeGetCharAt(pos+i)) + return false; + s++; + } + return true; +} + char WindowAccessor::StyleAt(int position) { return static_cast(Platform::SendScintilla( id, SCI_GETSTYLEAT, position, 0)); -- cgit v1.2.3