}
+bool contains(string const & a, char b)
+{
+ if (a.empty())
+ return false;
+ return a.find(b) != string::npos;
+}
+
+
bool contains(char const * a, char const * b)
{
Assert(a && b);
if (i == a.length() - 1) return tmp; // no c's at end of a
if (i != string::npos)
tmp.erase(i + 1, string::npos);
+#if !defined(USE_INCLUDED_STRING) && !defined(STD_STRING_IS_GOOD)
+ /// Needed for broken string::find_last_not_of
+ else if (tmp[0] != c) {
+ if (a.length() == 1) return tmp;
+ tmp.erase(1, string::npos);
+ }
+#endif
else
tmp.erase(); // only c in the whole string
return tmp;