diff options
author | dwight <dwight@10gen.com> | 2010-12-15 02:08:49 -0500 |
---|---|---|
committer | dwight <dwight@10gen.com> | 2010-12-15 10:42:45 -0500 |
commit | dad23bdae06bf171b7f2e5b2f1d4ed1f1ca07751 (patch) | |
tree | 1f7d89dac7bec49132fd46862e258e2417d56563 /util/mongoutils | |
parent | 62fbef60e708eaaf02de89be7af18edea4e5677e (diff) | |
download | mongo-dad23bdae06bf171b7f2e5b2f1d4ed1f1ca07751.tar.gz |
Revert "str stuff"
This reverts commit c4b67bcf8092dec4dc2bc20a86808d5fde517381.
Diffstat (limited to 'util/mongoutils')
-rw-r--r-- | util/mongoutils/str.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/util/mongoutils/str.h b/util/mongoutils/str.h index 9ffb30834cc..95a71931bb6 100644 --- a/util/mongoutils/str.h +++ b/util/mongoutils/str.h @@ -97,8 +97,6 @@ namespace mongoutils { /** @return true if s contains x */ inline bool contains(string s, string x) { return strstr(s.c_str(), x.c_str()) != 0; } - inline bool contains(string s, char x) { - return strchr(s.c_str(), x) != 0; } /** @return everything befor the character x, else entire string */ inline string before(const string& s, char x) { @@ -149,7 +147,7 @@ namespace mongoutils { R = string(p+1); return true; } - /** split scanning reverse direction. Splits ONCE ONLY. */ + /** split scanning reverse direction */ inline bool rSplitOn(const string &s, char c, string& L, string& R) { const char *start = s.c_str(); const char *p = strrchr(start, c); @@ -162,7 +160,6 @@ namespace mongoutils { return true; } - /** @return umber of occurrences of c in s */ inline unsigned count( const string& s , char c ){ unsigned n=0; for ( unsigned i=0; i<s.size(); i++ ) @@ -171,17 +168,6 @@ namespace mongoutils { return n; } - /** remove trailing chars in place */ - inline bool stripTrailing(string& s, const char *chars) { - string::iterator i = s.end(); - while( s.begin() != i ) { - i--; - if( contains(chars, *i) ) { - s.erase(i); - } - } - } - } } |