1#ifndef CDA_RAIL_STRINGHELPER_HPP
2#define CDA_RAIL_STRINGHELPER_HPP
6#include <initializer_list>
19[[nodiscard]] std::string
31 return std::ranges::equal(a, b, [](
char const c1,
char const c2) {
33 return std::tolower(
static_cast<unsigned char>(c1)) ==
34 std::tolower(
static_cast<unsigned char>(c2));
Definition CustomExceptions.hpp:15
std::string sanitize(std::string s)
Replaces every non-alphanumeric character by a hyphen.
Definition StringHelper.cpp:34
bool case_insensitive_str_equal(std::string_view a, std::string_view b)
Compares two strings for equality, ignoring case.
Definition StringHelper.hpp:30
void to_bool_optional_inplace(std::string_view s_view, std::optional< bool > &b)
Parses a textual boolean value into an optional in place.
Definition StringHelper.cpp:26
std::string concatenate_string_views(std::initializer_list< std::string_view > parts)
Concatenates multiple string views into a single string.
Definition StringHelper.cpp:11