Major string_view refactor. Added namespace sv
This commit is contained in:
@@ -197,7 +197,7 @@ static void pprint_r(Inspector &insp, int level, LuaSlot root) {
|
||||
} else {
|
||||
multiline = true;
|
||||
tabify(insp, level + 1);
|
||||
if (LS.isstring(key) && util::is_identifier(LS.ckstring(key))) {
|
||||
if (LS.isstring(key) && sv::is_lua_id(LS.ckstring(key))) {
|
||||
(*insp.stream) << LS.ckstring(key);
|
||||
} else {
|
||||
(*insp.stream) << "[";
|
||||
@@ -254,7 +254,7 @@ LuaDefine(string_isidentifier, "str", "return true if the string is a valid lua
|
||||
LuaStack LS(L, str, result);
|
||||
if (LS.isstring(str)) {
|
||||
eng::string s = LS.ckstring(str);
|
||||
LS.set(result, util::is_identifier(s));
|
||||
LS.set(result, sv::is_lua_id(s));
|
||||
} else {
|
||||
LS.set(result, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user