25#ifndef __STRING_TOOLS_HPP__
26#define __STRING_TOOLS_HPP__
31inline auto split(std::string
const str__,
char delim__)
33 std::istringstream iss(str__);
34 std::vector<std::string> result;
38 std::getline(iss, s, delim__);
44inline std::string& ltrim(std::string& str,
const std::string& chars =
"\t\n\v\f\r ")
46 str.erase(0, str.find_first_not_of(chars));
50inline std::string& rtrim(std::string& str,
const std::string& chars =
"\t\n\v\f\r ")
52 str.erase(str.find_last_not_of(chars) + 1);
56inline std::string& trim(std::string& str,
const std::string& chars =
"\t\n\v\f\r ")
58 return ltrim(rtrim(str, chars), chars);
Namespace of the SIRIUS library.
auto split(std::string const str__, char delim__)
Split multi-line string into a list of strings.