13 std::string_view delimiters) {
28 auto is_not_space = [](
unsigned char c) {
return !std::isspace(c); };
30 auto start = std::find_if(
str.begin(),
str.end(), is_not_space);
31 auto end = std::find_if(
str.rbegin(),
str.rend(), is_not_space).base();
33 return (start <
end) ? std::string_view(start,
end) : std::string_view{};
36 std::vector<int>
tokenizeInt(std::string_view
str, std::string_view delimiters) {
41 int result{std::numeric_limits<int>::max()};
47 double result{std::numeric_limits<double>::max()};
std::vector< double > tokenizeDouble(std::string_view the_str, std::string_view delimiter)
std::string_view trimWhiteSpaces(std::string_view str) noexcept
Removes all trailing and starting whitespaces from a string.
std::vector< int > tokenizeInt(std::string_view str, std::string_view delimiter)
double atof(std::string_view str)
Converts a string into a double / float.
const_iterator end() const
Return an end iterator.
std::vector< std::string > tokenize(std::string_view the_str, std::string_view delimiters)
Splits the string into smaller substrings.
void convertToNumber(std::string_view str, dType &number)
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...