aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/WindowAccessor.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2002-05-20 07:34:07 +0000
committernyamatongwe <devnull@localhost>2002-05-20 07:34:07 +0000
commit457f1a4f6b7b7c066db3842f0d2f622afb85a3ed (patch)
tree47fb5a85c3f1a491576ae9b06af25016631be14d /src/WindowAccessor.cxx
parent51abc6e7d4e9c37a98266eba25589c24a713d64b (diff)
downloadscintilla-mirror-457f1a4f6b7b7c066db3842f0d2f622afb85a3ed.tar.gz
Added a Match method to Accessor to make it easy to check for strings in a document. Moved IsASpaceOrTab into StyleContext header.
Diffstat (limited to 'src/WindowAccessor.cxx')
-rw-r--r--src/WindowAccessor.cxx9
1 files changed, 9 insertions, 0 deletions
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<long>(&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<char>(Platform::SendScintilla(
id, SCI_GETSTYLEAT, position, 0));