MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaS_eqstr

Function luaS_eqstr

third-party/lua-5.5.0/src/lstring.c:44–50  ·  view source on GitHub ↗

** generic equality for strings */

Source from the content-addressed store, hash-verified

42** generic equality for strings
43*/
44int luaS_eqstr (TString *a, TString *b) {
45 size_t len1, len2;
46 const char *s1 = getlstr(a, len1);
47 const char *s2 = getlstr(b, len2);
48 return ((len1 == len2) && /* equal length and ... */
49 (memcmp(s1, s2, len1) == 0)); /* equal contents */
50}
51
52
53static unsigned luaS_hash (const char *str, size_t l, unsigned seed) {

Callers 2

luaV_equalobjFunction · 0.70
equalkeyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected