diff options
| author | nyamatongwe <devnull@localhost> | 2001-06-27 23:14:55 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2001-06-27 23:14:55 +0000 | 
| commit | 969f6e86c87690fcf59539e49df57da7a50722d2 (patch) | |
| tree | 99a5c67d8b84490bd1df4a7dcd3eb5d886ce6f03 /src/PropSet.cxx | |
| parent | b5d6451344d1ec6d00b2eb023ace68052293d9b2 (diff) | |
| download | scintilla-mirror-969f6e86c87690fcf59539e49df57da7a50722d2.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.
Diffstat (limited to 'src/PropSet.cxx')
| -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;  } | 
