31#include "neml2/misc/errors.h"
32#include "neml2/misc/types.h"
36template <
typename T,
typename... Args>
37void stream_all(std::ostringstream & ss, T && val, Args &&... args);
45std::string
join(
const std::vector<std::string> & strs,
const std::string & delim);
47std::vector<std::string>
split(
const std::string & str,
const std::string & delims);
49std::string
trim(
const std::string & str,
const std::string & white_space =
" \t\n\v\f\r");
51bool start_with(std::string_view str, std::string_view prefix);
53bool end_with(std::string_view str, std::string_view suffix);
62template <
typename T,
typename... Args>
64stream_all(std::ostringstream & ss, T && val, Args &&... args)
67 if constexpr (
sizeof...(args) > 0)
64stream_all(std::ostringstream & ss, T && val, Args &&... args) {
…}
75 std::ostringstream os;
84 return t ?
"true" :
"false";
std::string trim(const std::string &str, const std::string &white_space)
Definition string_utils.cxx:73
std::string stringify(const T &t)
Definition string_utils.h:73
std::string demangle(const char *name)
Demangle a piece of cxx abi type information.
Definition string_utils.cxx:32
std::string join(const std::vector< std::string > &strs, const std::string &delim)
Definition string_utils.cxx:39
std::vector< std::string > split(const std::string &str, const std::string &delims)
Definition string_utils.cxx:52
bool start_with(std::string_view str, std::string_view prefix)
Definition string_utils.cxx:83
bool end_with(std::string_view str, std::string_view suffix)
Definition string_utils.cxx:89
void stream_all(std::ostringstream &ss, T &&val, Args &&... args)
Definition string_utils.h:64
std::string name(ElasticConstant p)
Definition ElasticityConverter.cxx:30