23 if (*str == 0 || *str != *match)
return false;
30 std::string::const_iterator m = match.begin();
31 while (m != match.end()) {
32 if (*str == 0 || *str != *m)
return false;
39 std::string::const_iterator s = str.begin();
41 if (s == str.end() || *s != *match)
return false;
47 bool starts_with(
const std::string& str,
const std::string& match) {
48 if (match.size() > str.size())
50 return std::equal(match.begin(), match.end(), str.begin());
65 std::string::const_iterator m = match.begin();
66 while (m != match.end()) {
74 std::string::const_iterator s = str.begin();
84 if (match.size() > str.size())
86 return std::equal(match.begin(), match.end(), str.begin(),
87 [](
const char& c1,
const char& c2) {
char to_lower(char ch)
Transform the given character to lower case without any localization.
bool starts_with(const char *str, const char *match)
Checks if the given match string is located at the start of this string.
bool starts_with_icase(const char *str, const char *match)
Checks if the given match string is located at the start of this string.