diff -r 248fba6d1e76 -r 7fc34735178e sources/mystring.cpp --- a/sources/mystring.cpp Wed Jan 27 12:38:00 2021 +0200 +++ b/sources/mystring.cpp Wed Jan 27 13:02:51 2021 +0200 @@ -48,26 +48,6 @@ } /*! - * \brief Removes all instances of an unwanted character from this string. - * \param unwanted Character to remove. - */ -void String::strip (char unwanted) -{ - for (int pos = 0; (pos = find (unwanted)) != -1;) - removeAt (pos--); -} - -/*! - * \brief Removes all instances of multiple characters from this string. - * \param unwanted Characters to remove. - */ -void String::strip (const List& unwanted) -{ - for (char character : unwanted) - strip(character); -} - -/*! * \returns an upper-case version of this string. */ String String::toUpperCase() const @@ -128,14 +108,14 @@ String sub = mid (a, b); if (sub.length() > 0) - result << sub; + result.push_back(sub); a = b + delimeter.length(); } // Add the string at the right of the last separator if (a < (int) length()) - result.append (mid (a, length())); + result.push_back(mid(a, length())); return result; } @@ -409,11 +389,11 @@ * \param delimeter The delimeter to place between the element strings. * \returns the catenated string. */ -String StringList::join (const String& delimeter) +String join_string_list(const StringList& strings, const String& delimeter) { String result; - for (const String &item : container()) + for (const String &item : strings) { if (result.isEmpty() == false) result += delimeter;