MCPcopy Create free account
hub / github.com/acl-dev/acl / equal

Method equal

lib_acl_cpp/src/stdlib/string.cpp:971–985  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

969}
970
971bool 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
987bool string::begin_with(const char* s, bool case_sensitive /* = true */) const
988{

Callers 15

runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
fiber_workerFunction · 0.80
fiber_resultFunction · 0.80
roleMethod · 0.80
subop_resultMethod · 0.80
get_messageMethod · 0.80
redis_commands.cppFile · 0.80
checkMethod · 0.80
runMethod · 0.80

Calls 1

acl_strcasecmpFunction · 0.85

Tested by

no test coverage detected