| 120 | inline std::string to_lower(std::string s) { return transform_string(std::move(s), ::tolower); } |
| 121 | |
| 122 | inline bool starts_with(const std::string& value, const std::string& prefix) |
| 123 | { |
| 124 | if(prefix.size() > value.size()) |
| 125 | return false; |
| 126 | else |
| 127 | return std::equal(prefix.begin(), prefix.end(), value.begin()); |
| 128 | } |
| 129 | |
| 130 | inline std::string remove_prefix(std::string s, const std::string& prefix) |
| 131 | { |