aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/WindowAccessor.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2002-05-20 07:34:07 +0000
committernyamatongwe <unknown>2002-05-20 07:34:07 +0000
commit94b85e1fad1ca53b56fa1e1d41c5627849603b27 (patch)
tree47fb5a85c3f1a491576ae9b06af25016631be14d /src/WindowAccessor.cxx
parent01629f9e76ae6614b54631f3dbabad7301ddda27 (diff)
downloadscintilla-mirror-94b85e1fad1ca53b56fa1e1d41c5627849603b27.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));