Tcl's string command in TypeScript


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

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

  • Get inspiration from the Tcl command reference.
  • 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 15/23 shipped • 6 next 65%

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

string ensemble

Tcl 8.6 · Catalog source: live runtime snapshot python:3.12

71% shipped
15/21 shipped 6 next 2 explicit non-goals 1 intentional extras
Shipped (16)

Next

Tcl string subcommands map naturally onto JS string and array values.

  • cat
  • index
  • replace
  • totitle
  • wordend
  • wordstart

Intentional extras

Explicit non-goals (2)
  • bytelength Skip Byte-length helpers add little value in a UTF-16 JS runtime.
  • is Skip Tcl classifier subcommands are too broad and type-system-specific for one clean port.

« More Tcl functions