16 inline bool equalsIgnoreCase(
const std::string &source,
const std::string &target) {
17 if (source.size() != target.size()) {
21 return std::equal(source.begin(), source.end(), target.begin(),
22 [](
unsigned char lhs,
unsigned char rhs) {
23 return std::tolower(lhs) == std::tolower(rhs);
31 inline void trim(std::string &value) {
32 const auto start = value.find_first_not_of(
" \t\r\n\f\v");
33 if (start == std::string::npos) {
37 const auto end = value.find_last_not_of(
" \t\r\n\f\v");
40 value.erase(0, start);