Add LuaDefineAlias
This commit is contained in:
@@ -320,25 +320,9 @@ LuaDefine(string_print, "obj",
|
||||
"|Concise print the specified object into a string"
|
||||
"|"
|
||||
"|This prints a concise representation of obj into a string. Tables"
|
||||
"|are not expanded: for that, use string.pprintx. The functions"
|
||||
"|tostring and string.print are identical."
|
||||
"|") {
|
||||
LuaArg val;
|
||||
LuaRet result;
|
||||
LuaDefStack LS(L, val, result);
|
||||
eng::ostringstream oss;
|
||||
atomic_print(LS, val, false, &oss);
|
||||
LS.set(result, oss.str());
|
||||
return LS.result();
|
||||
}
|
||||
|
||||
|
||||
LuaDefine(tostring, "obj",
|
||||
"|Concise print the specified object into a string"
|
||||
"|are not expanded: for that, use string.pprint or string.pprintx."
|
||||
"|"
|
||||
"|This prints a concise representation of obj into a string. Tables"
|
||||
"|are not expanded: for that, use string.pprint. The functions"
|
||||
"|tostring and string.print are identical."
|
||||
"|The functions string.print and tostring are identical."
|
||||
"|") {
|
||||
LuaArg val;
|
||||
LuaRet result;
|
||||
@@ -349,6 +333,8 @@ LuaDefine(tostring, "obj",
|
||||
return LS.result();
|
||||
}
|
||||
|
||||
LuaDefineAlias(tostring, string_print);
|
||||
|
||||
LuaDefine(string_isidentifier, "str", "return true if the string is a valid lua identifier") {
|
||||
LuaArg str;
|
||||
LuaRet result;
|
||||
|
||||
Reference in New Issue
Block a user