35 std::string
str()
const
37 return std::string(
_data.data());
41 std::array<char, MAX + 1>
_data;
45 const std::string &text,
72#define PRECICE_AS_STRING(message) [&] { \
73 std::ostringstream oss; \
78std::size_t
editDistance(std::string_view s1, std::string_view s2);
94template <
class Container>
95std::vector<StringMatch>
computeMatches(std::string_view given,
const Container &expected)
97 std::vector<StringMatch> entries;
98 for (
const auto &candidate : expected) {
103 std::sort(entries.begin(), entries.end());
std::array< char, MAX+1 > _data
contains precice-related utilities.
bool isKebabStyle(std::string_view sv)
std::size_t editDistance(std::string_view s1, std::string_view s2)
bool convertStringToBool(std::string const &value)
Evaluates a string to find out if it represents a bool.
std::string truncate_wstring_to_string(std::wstring wstr, char fill)
std::string wrapText(const std::string &text, int linewidth, int indentation)
std::string & checkAppendExtension(std::string &filename, const std::string &extension)
Checks if filename has the given extension, if not appends it.
std::vector< StringMatch > computeMatches(std::string_view given, const Container &expected)
bool operator<(const StringMatch &other) const