diff options
author | nyamatongwe <unknown> | 2002-05-20 07:34:07 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2002-05-20 07:34:07 +0000 |
commit | 94b85e1fad1ca53b56fa1e1d41c5627849603b27 (patch) | |
tree | 47fb5a85c3f1a491576ae9b06af25016631be14d /src/DocumentAccessor.cxx | |
parent | 01629f9e76ae6614b54631f3dbabad7301ddda27 (diff) | |
download | scintilla-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/DocumentAccessor.cxx')
-rw-r--r-- | src/DocumentAccessor.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/DocumentAccessor.cxx b/src/DocumentAccessor.cxx index f115f1930..595edf8ba 100644 --- a/src/DocumentAccessor.cxx +++ b/src/DocumentAccessor.cxx @@ -48,6 +48,15 @@ void DocumentAccessor::Fill(int position) { buf[endPos-startPos] = '\0'; } +bool DocumentAccessor::Match(int pos, const char *s) { + for (int i=0; *s; i++) { + if (*s != SafeGetCharAt(pos+i)) + return false; + s++; + } + return true; +} + char DocumentAccessor::StyleAt(int position) { return pdoc->StyleAt(position); } |