9 #include <cppassist/cppassist_api.h> 30 template <
class Iterable>
31 std::string
join(
const Iterable & iterable,
const std::string & separator);
45 CPPASSIST_API std::string
trim(
const std::string &
string,
bool removeAllWhitespace =
false);
61 CPPASSIST_API std::string
padLeft(
const std::string &
string,
size_t length,
char c =
' ');
77 CPPASSIST_API std::string
padRight(
const std::string &
string,
size_t length,
char c =
' ');
91 CPPASSIST_API std::string
stripped(
const std::string &
string,
const std::set<char> & blacklist);
105 CPPASSIST_API std::vector<std::string>
parseArray(
const std::string &
string,
size_t size);
121 CPPASSIST_API std::vector<std::string>
split(
const std::string &
string,
char delimiter,
bool keepEmptyParts =
true);
135 CPPASSIST_API
bool contains(
const std::string &
string,
const std::string & containsstring);
149 CPPASSIST_API
bool hasPrefix(
const std::string &
string,
const std::string & prefix);
163 CPPASSIST_API
bool hasSuffix(
const std::string &
string,
const std::string & suffix);
CPPASSIST_API bool hasPrefix(const std::string &string, const std::string &prefix)
Check if a string starts with a given prefix.
CPPASSIST_API std::vector< std::string > parseArray(const std::string &string, size_t size)
Split string into substrings.
Definition: ArgumentParser.h:12
CPPASSIST_API std::string stripped(const std::string &string, const std::set< char > &blacklist)
Remove all occurences of provided characters from the string.
CPPASSIST_API std::vector< std::string > split(const std::string &string, char delimiter, bool keepEmptyParts=true)
Split string into substrings.
CPPASSIST_API std::string trim(const std::string &string, bool removeAllWhitespace=false)
Trim string by removing whitespace.
std::string join(const Iterable &iterable, const std::string &separator)
Join all values of a container in a single string.
Definition: manipulation.inl:15
CPPASSIST_API bool contains(const std::string &string, const std::string &containsstring)
Check if a string contains a substring.
CPPASSIST_API std::string padRight(const std::string &string, size_t length, char c=' ')
Pad string with character (add to the right until the given size is reached)
CPPASSIST_API bool hasSuffix(const std::string &string, const std::string &suffix)
Check if a string ends with a given suffix.
CPPASSIST_API std::string padLeft(const std::string &string, size_t length, char c=' ')
Pad string with character (add to the left until the given size is reached)