16 bool startsWith(
const std::string& s,
const std::string& start);
19 std::string
trim(
const std::string& s);
22 std::string
lowercase(
const std::string& s);
25 std::string
replaceFirst(
const std::string& source,
const std::string& old,
const std::string& s);
28 std::string
replaceAll(
const std::string& source,
const std::string& old,
const std::string& s);
48 std::set<std::string> names;
55 std::string
getName(
const std::string& name);
Generic dynamically allocated resizable storage.
uint32_t Size
Integral type used to index arrays (by default).
#define NAMESPACE_SPH_END
Wrapper of type value of which may or may not be present.
std::string replaceFirst(const std::string &source, const std::string &old, const std::string &s)
Replaces first occurence of string with a new string.
std::string setLineBreak(const std::string &s, const Size lineWidth)
Inserts to string so that no line is longer than given limit.
std::string trim(const std::string &s)
Removes all leading and trailing spaces from a string.
std::string replaceAll(const std::string &source, const std::string &old, const std::string &s)
Replaces all occurences of string with a new string.
Array< std::string > split(const std::string &s, const char delimiter)
Splits a string into an array of string using given delimiter.
Pair< std::string > splitByFirst(const std::string &s, const char delimiter)
Splits a string into two parts, using first occurence of given delimiter.
bool startsWith(const std::string &s, const std::string &start)
Checks if the given string starts with given substring.
std::string lowercase(const std::string &s)
Converts all uppercase characters to their lowercase variants. Other characters are unchanged.
std::string capitalize(const std::string &s)
Capitalizes first letters of all words in the string, except for words like 'and',...
NAMESPACE_SPH_BEGIN Optional< T > fromString(const std::string &s)
Converts a string to given type.
Object providing safe access to continuous memory of data.
Wrapper of type value of which may or may not be present.
Array with fixed number of allocated elements.
UniqueNameManager()=default
std::string getName(const std::string &name)