diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-03-16 09:45:50 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-03-16 15:10:30 +0100 |
commit | 4161f6756dadef6cd5a5c2e1e75804122e892949 (patch) | |
tree | f229a3b3fee394fe9cc2c8a977196d62c09132e7 /src/luaconf.js | |
parent | 8388f1d2eb85bfc5fdbe1cfeb62e85a7d88403b5 (diff) | |
download | fengari-4161f6756dadef6cd5a5c2e1e75804122e892949.tar.gz fengari-4161f6756dadef6cd5a5c2e1e75804122e892949.tar.bz2 fengari-4161f6756dadef6cd5a5c2e1e75804122e892949.zip |
string.format
Diffstat (limited to 'src/luaconf.js')
-rw-r--r-- | src/luaconf.js | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/luaconf.js b/src/luaconf.js index f0066de..fc96224 100644 --- a/src/luaconf.js +++ b/src/luaconf.js @@ -20,6 +20,21 @@ const lua_numbertointeger = function(n) { return n|0; }; -module.exports.LUAI_MAXSTACK = LUAI_MAXSTACK; -module.exports.LUA_IDSIZE = LUA_IDSIZE; -module.exports.lua_numbertointeger = lua_numbertointeger;
\ No newline at end of file +const LUA_INTEGER_FRMLEN = ""; +const LUA_NUMBER_FRMLEN = ""; + +const LUA_INTEGER_FMT = `%${LUA_INTEGER_FRMLEN}d`; +const LUA_NUMBER_FMT = "%.7g"; + +const lua_getlocaledecpoint = function() { + return (1.1).toLocaleString().substring(1, 2); +}; + +module.exports.LUAI_MAXSTACK = LUAI_MAXSTACK; +module.exports.LUA_IDSIZE = LUA_IDSIZE; +module.exports.LUA_INTEGER_FMT = LUA_INTEGER_FMT; +module.exports.LUA_INTEGER_FRMLEN = LUA_INTEGER_FRMLEN; +module.exports.LUA_NUMBER_FMT = LUA_NUMBER_FMT; +module.exports.LUA_NUMBER_FRMLEN = LUA_NUMBER_FRMLEN; +module.exports.lua_getlocaledecpoint = lua_getlocaledecpoint; +module.exports.lua_numbertointeger = lua_numbertointeger;
\ No newline at end of file |