aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/SString.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/SString.h b/include/SString.h
index c34d7d836..ea2eec993 100644
--- a/include/SString.h
+++ b/include/SString.h
@@ -170,6 +170,12 @@ public:
bool operator!=(const char *sother) const {
return !operator==(sother);
}
+ bool contains(char ch) {
+ if (s && *s)
+ return strchr(s, ch) != 0;
+ else
+ return false;
+ }
const char *c_str() const {
if (s)
return s;