Added Common::String::contains() method
svn-id: r26514
This commit is contained in:
parent
35b19cdcc8
commit
aecd100f93
3 changed files with 16 additions and 2 deletions
|
@ -211,6 +211,11 @@ bool String::hasSuffix(const char *x) const {
|
|||
return *x == 0;
|
||||
}
|
||||
|
||||
bool String::contains(const char *x) const {
|
||||
assert(x != 0);
|
||||
return strstr(c_str(), x) != NULL;
|
||||
}
|
||||
|
||||
void String::deleteLastChar() {
|
||||
deleteChar(_len - 1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue