diff options
author | nyamatongwe <devnull@localhost> | 2004-03-04 11:50:12 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2004-03-04 11:50:12 +0000 |
commit | 8478222abdc5012ddc51713d2720cf571a3bc251 (patch) | |
tree | 43ab2370417e15544a8f99a72afc135d9bd46c7f /include/SString.h | |
parent | a11744bf524da19d5627aca61b129569e8131d76 (diff) | |
download | scintilla-mirror-8478222abdc5012ddc51713d2720cf571a3bc251.tar.gz |
Added startswith and endswith methods to SString.
Diffstat (limited to 'include/SString.h')
-rw-r--r-- | include/SString.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/SString.h b/include/SString.h index 63930189c..3efb84a03 100644 --- a/include/SString.h +++ b/include/SString.h @@ -144,7 +144,7 @@ public: * starting at @a pos, the string is just truncated at @a pos. */ void remove(lenpos_t pos, lenpos_t len); - + SString &change(lenpos_t pos, char ch) { if (pos < sLen) { // character changed must be in string bounds *(s + pos) = ch; @@ -155,6 +155,8 @@ public: int value() const { return s ? atoi(s) : 0; } + bool startswith(const char *prefix); + bool endswith(const char *suffix); int search(const char *sFind, lenpos_t start=0) const; bool contains(const char *sFind) { return search(sFind) >= 0; |