| 969 | } |
| 970 | |
| 971 | bool string::equal(const string& s, bool case_sensitive /* = true */) const |
| 972 | { |
| 973 | size_t n1 = LEN(vbf_), n2 = LEN(s.vbf_); |
| 974 | if (n1 != n2) { |
| 975 | return false; |
| 976 | } |
| 977 | |
| 978 | size_t n = n1 > n2 ? n2 : n1; |
| 979 | |
| 980 | if (case_sensitive) { |
| 981 | return memcmp(STR(vbf_), STR(s.vbf_), n) == 0; |
| 982 | } |
| 983 | |
| 984 | return acl_strcasecmp(STR(vbf_), STR(s.vbf_)) == 0; |
| 985 | } |
| 986 | |
| 987 | bool string::begin_with(const char* s, bool case_sensitive /* = true */) const |
| 988 | { |
no test coverage detected