diff -r e4966d7e615d -r cad1163333b9 sources/mystring.cpp --- a/sources/mystring.cpp Sat Jan 09 18:09:32 2016 +0200 +++ b/sources/mystring.cpp Sun Jan 10 19:38:11 2016 +0200 @@ -54,7 +54,19 @@ // ------------------------------------------------------------------------------------------------- // -String String::strip (const List& unwanted) +String String::strip (char unwanted) const +{ + String result (m_string); + + for (int pos = 0; (pos = result.find (unwanted)) != -1;) + result.remove_at (pos--); + + return result; +} + +// ------------------------------------------------------------------------------------------------- +// +String String::strip (const List& unwanted) const { String result (m_string); @@ -221,6 +233,18 @@ // ------------------------------------------------------------------------------------------------- // +int String::find (char ch, int a) const +{ + int pos = m_string.find (ch, a); + + if (pos == int (std::string::npos)) + return -1; + + return pos; +} + +// ------------------------------------------------------------------------------------------------- +// int String::find_last (const char* c, int a) const { if (a == -1 or a >= length())