ilusm.dev

txt

text transforms. Pure ilusm.

Load with: use txt

Quick example

use txt

result = txtsu("value", "value", "value")
prn(result)

Functions

Functions

txtsu(s, a, b)

Performs the operation. Takes s, a, b.

txtid(s, sub)

Performs the operation. Takes s, sub.

txtha(s, sub)

Performs the operation. Takes s, sub.

txtsp(s, d)

Performs the operation. Takes s, d.

txtjn(xs, sep)

Performs the operation. Takes xs, sep.

txttr(s)

Performs the operation. Takes s.

txtre(s, old, nw)

Performs the operation. Takes s, old, nw.

txtup(s)

Updates. Takes s.

txtlw(s)

Performs the operation. Takes s.

txtpf(s, p)

Performs the operation. Takes s, p.

txtsf(s, sfx)

Performs the operation. Takes s, sfx.

txtat(s, i)

Performs the operation. Takes s, i.

txtln(s)

Performs the operation. Takes s.

txtrv(s)

Performs the operation. Takes s.

txtoc(s, sub)

Performs the operation. Takes s, sub.

txtrp(s, n)

Performs the operation. Takes s, n.

txtp0(s, n, c)

Performs the operation. Takes s, n, c.

txtpd(s, n, c)

Performs the operation. Takes s, n, c.

txtbl()

Performs the operation.

txtch(n)

Checks a condition. Takes n.

txthex(n)

Executes. Takes n.

txtuhx(s)

Performs the operation. Takes s.

txtfmt(t, args)

Performs the operation. Takes t, args.

txtbytes(s)

Performs the operation. Takes s.

txtcmp(a, b)

Performs the operation. Takes a, b.

txtlst(s)

Sets a value or starts a process. Takes s.

txtmat(s, pat)

Performs the operation. Takes s, pat.

txtwrap(s, w)

Performs the operation. Takes s, w.

Module aliases

These are the public-facing names you call with use txt:

  • txt.sub(s, a, b)
  • txt.idx(s, sub)
  • txt.has(s, sub)
  • txt.spl(s, d)
  • txt.jn(xs, sep)
  • txt.trm(s)
  • txt.rep(s, old, nw)
  • txt.upr(s)
  • txt.lwr(s)
  • txt.pfx(s, p)
  • txt.sfx(s, sfx)
  • txt.at(s, i)
  • txt.len(s)
  • txt.rev(s)
  • txt.cnt(s, sub)
  • txt.rpt(s, n)
  • txt.pad(s, n, c)
  • txt.padr(s, n, c)
  • txt.bld()
  • txt.chr(n)
  • txt.ord(c)
  • txt.str(x)
  • txt.join(xs, sep)
  • txt.low(s)
  • txt.fmt(t, ...args)
  • txt.hex(n)
  • txt.unhex(s)
  • txt.ends(s, sfx)
  • txt.lns(s)
  • txt.rpl(s, old, nw)
  • txt.find(s, sub)
  • txt.lpad(s, n, c)
  • txt.spln(s)
  • txt.rextr(s, pat)
  • txt.split(s, d)
  • txt.joi(xs, sep)
  • txt.repl(s, old, nw)
  • txt.trim(s)
  • txt.bytes(s)
  • txt.cmp(a, b)
  • txt.dec(s)
  • txt.enc(s)
  • txt.lst(s)
  • txt.mat(s, pat)
  • txt.rdlns(path)
  • txt.start(s, p)
  • txt.sux(s, sfx)
  • txt.upp(s)
  • txt.wrap(s, w)
  • txt.wrlns(path, lns)

Notes

  • Text processing - substring, split, trim, replace, case, padding.
  • Most functions available as both txtXX and txt.verb aliases.