luna-core 2.10.0

Pure-Rust Lua runtime (interpreter only, zero third-party dependencies). The JIT-equipped variant lives in the `luna-jit` crate.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- v2.10 CORPUS: string library extended.
print(string.byte("hello", 2))
print(string.byte("hello", -1))  -- 'o' from end
print(string.char(72, 105))
print(string.sub("hello", -3))
print(string.sub("hello", 1, -2))
print(string.gmatch("a,b,c,d", "[^,]+")())
local t = {}
for w in string.gmatch("a,b,c,d", "[^,]+") do
  t[#t+1] = w
end
print(table.concat(t, "|"))
print(string.match("hello 42 world 100", "(%a+) (%d+) (%a+)"))
local n, k = string.gsub("hello", "l", "L")
print(n, k)