--- a/sources/mystring.h Mon Jan 25 04:15:31 2016 +0200 +++ b/sources/mystring.h Wed Jul 20 12:55:39 2016 +0300 @@ -1,5 +1,5 @@ /* - Copyright 2014, 2015 Teemu Piippo + Copyright 2014 - 2016 Teemu Piippo All rights reserved. Redistribution and use in source and binary forms, with or without @@ -69,18 +69,21 @@ int count (char needle) const; const char* chars() const { return m_string.c_str(); } ConstIterator end() const { return m_string.end(); } - int find (const char*c, int a = 0) const; + int find (const char* c, int a = 0) const; + int find (char ch, int a = 0) const; bool is_empty() const { return m_string[0] == '\0'; } bool is_numeric() const; int find_last (const char*c, int a) const; int length() const { return m_string.length(); } bool mask_against (const String &pattern) const; String md5() const; - String mid (long a, long b) const; + String mid (int a, int b) const; String right (int length) const; StringList split (const String &del) const; StringList split (char del) const; const std::string& std_string() const { return m_string; } + String strip (char unwanted) const; + String strip (const List<char> &unwanted) const; double to_double (bool* ok = nullptr) const; float to_float (bool* ok = nullptr) const; long to_int (bool* ok = nullptr, int base = 10) const; @@ -112,8 +115,6 @@ void __cdecl sprintf (const char* fmtstr, ...); void vsprintf (const char* fmtstr, va_list args); bool starts_with (const String &other) const; - String strip (char unwanted) { return strip ({unwanted}); } - String strip (const List<char> &unwanted); void trim (int n); static String from_number (short int a);