diff options
author | nyamatongwe <unknown> | 2001-06-27 23:14:55 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2001-06-27 23:14:55 +0000 |
commit | 1fa680df8f1c8299da28e2280ec1b33c8850d2f7 (patch) | |
tree | 99a5c67d8b84490bd1df4a7dcd3eb5d886ce6f03 | |
parent | 27018313af1a53ba6bdf32aff4b845e1b0facaa6 (diff) | |
download | scintilla-mirror-1fa680df8f1c8299da28e2280ec1b33c8850d2f7.tar.gz |
Added prefix matching to WordList::InList which takes any word in
the list starting with '^' as a prefix. The rest of the word after the '^'
is then checked against the argument and if it is a prefix then true is
returned.
-rw-r--r-- | src/PropSet.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/PropSet.cxx b/src/PropSet.cxx index ac88e61c7..5287fb36b 100644 --- a/src/PropSet.cxx +++ b/src/PropSet.cxx @@ -532,6 +532,20 @@ bool WordList::InList(const char *s) { j++; } } + j = starts['^']; + if (j >= 0) { + while (words[j][0] == '^') { + const char *a = words[j] + 1; + const char *b = s; + while (*a && *a == *b) { + a++; + b++; + } + if (!*a) + return true; + j++; + } + } return false; } |