Lua's string library in TypeScript


We have 16 Lua functions so far - help us add more

Got a rainy Sunday afternoon and a taste for a porting puzzle?

  • Get inspiration from the Lua 5.4 manual.
  • Click "New file" in the appropriate folder on GitHub. This will fork the project to your account, directly add the file to it, and send a Pull Request to us.

We will then review it. If it's useful to the project and in line with our contributing guidelines your work will become part of Locutus and you'll be automatically credited in the authors section accordingly.

Upstream Surface Inventory 7/17 shipped • 5 next 41%

Namespace-level inventory for Lua 5.4: what we already ship, what we may still want, and what we intentionally skip or keep.

string

Lua 5.4 · Catalog source: live runtime snapshot nickblah/lua:5.4-alpine:string

58% shipped
7/12 shipped 5 next 5 explicit non-goals
Shipped (7)

Next

Lua string helpers are strong plain-value portability targets.

  • byte
  • char
  • find
  • format
  • match
Explicit non-goals (5)
  • dump Skip Bytecode dumping is not a good security or portability target.
  • gmatch Skip Iterator-returning APIs do not fit Locutus' plain-value model.
  • pack Skip Binary packing semantics do not map cleanly to JS plain values.
  • packsize Skip Binary packing semantics do not map cleanly to JS plain values.
  • unpack Skip Binary packing semantics do not map cleanly to JS plain values.

« More Lua functions