4b: Text Processing

+at

Basic printing.

Container core for basic $atom printing functions.

Note that these are largely deprecated, using outdated syntax, character mappings and encodings, and should generally not be used.

Accepts

.a is a @.

Source

++  at
  |_  a=@

+r:at

Print term, number or hex.

If .a is composed of the letters a through z and -, print as @tas syntax. If .a is an $atom of two bytes or less, print as an integer with comma-separated thousands. Otherwise, print .a as @ux syntax.

Accepts

.a is a @, and is the sample of +at.

Produces

A $tape.

Source

Examples


+rf:at

Print loobean.

If .a is a loobean, print as |/&, otherwise crash.

Accepts

.a is a @, and is the sample of +at.

Produces

A $tape.

Source

Examples


+rn:at

Print null.

If .a is null, print ~, otherwise crash.

Accepts

.a is a @, and is the sample of +at.

Produces

A $tape.

Source

Examples

+rt:at

Print cord, including escape characters.

Print .a with $cord syntax, including escape characters.

Accepts

.a is a @, and the sample of +at.

Produces

A $tape.

Source

Examples


+rta:at

Same as +rt:at.

Source


+rtam:at

Print cord with @tas syntax.

Treat .a as $cord, print it with % prefix.

Accepts

.a is a @, and is the sample of +at.

Produces

A $tape.

Source

Examples


+rub:at

Print binary.

Print .a as @ub syntax, except with - separators rather than . separators.

Accepts

.a is a @, and is the sample of +at.

Produces

A $tape.

Source

Examples


+rud:at

Print $atom as integer.

Print $atom .a as an integer, with commas separating thousands.

Accepts

.a is a @.

Produces

A $tape.

Source

Examples


+rum:at

Print base-n.

Print .a as base .b with suffix .c and using gate .d to convert blocks to characters. Each set of four characters will be separated by -, except for base 10 which will be printed with commas separating thousands.

Accepts

  • .a is a @, and is the sample of +at.

  • .b is a @, denoting the the base.

  • .c is a $tape, and will be appended to the end of the result.

  • .d is a $gate that takes @ and produces @.

Produces

A $tape.

Source

Examples


+rup:at

Print @p (outdated).

Print .a as a @p, but with outdated syntax and number<->syllable mapping. This function almost certainly should not be used.

Accepts

.a is a @.

Produces

A $tape.

Source

Examples


+ruv:at

Print base-64.

Print .a as outdated base-64 syntax, with 0v rather than 0w prefix, different character mappings and separators.

Accepts

.a is a @, and is the sample of +at.

Produces

A $tape.

Source

Examples

Note this is how it should be rendered:


+rux:at

Print hexadecimal.

Print .a as @ux except with - separators rather than .s.

Accepts

.a is a @, and is the sample of +at.

Produces

A $tape.

Source

Examples


+cass

To lowercase.

Turn all occurences of uppercase letters in any $tape into lowercase letters. Returns a $tape.

Accepts

.vib is a $tape.

Produces

A $tape.

Source

Examples


+crip

Tape to cord.

Produce a $cord from a $tape.

Accepts

.a is a $tape.

Produces

A $cord.

Source

Examples


+cuss

To uppercase.

Turn all occurences of lowercase letters in any $tape into uppercase letters. Returns a $tape.

Accepts

.vib is a $tape.

Produces

A $tape.

Source

Examples


+mesc

Escape special chars.

Escape special characters.

Accepts

.vib is a $tape.

Produces

A $tape.

Source

Examples


+runt

Prepend n times.

Add .a repetitions of character .b to the head of $tape .c.

Accepts

.a and .b are $atoms.

.c is a $tape.

Produces

A $tape.

Source

Examples


+sand

Soft-cast by aura.

Check characters in .b are valid for aura .a. Produce a +unit of .a if valid and a null +unit if not. Takes .a and produces a gate that takes .b.

Accepts

.a is a @ta, and specifies the aura like %tas or %ta.

.b is an $atom.

Produces

A (unit @).

Source

Examples


+sane

Check aura validity.

Check validity of .a by aura .b. Takes .b and produces a gate that takes .a.

Accepts

.a is a @ta, and specifies the aura like %tas or %ta.

.b is an $atom.

Produces

A $flag.

Source

Examples


+taft

UTF-8 to UTF-32.

Convert $cord .a to a UTF-32 @c.

Accepts

.a is a @t.

Produces

A @c.

Source

Examples


+teff

UTF-8 Length.

Produces the number of utf8 bytes of .a, a single @t character. If .a contains more than one character, it will produce the byte-length of the first one.

Accepts

.a is a @t.

Produces

An $atom.

Source

Examples


+trim

Tape split.

Split first .a characters off $tape .b.

Accepts

.a is an $atom.

.b is a $tape.

Produces

A cell of $tapes, .p and .q.

Source

Examples


+trip

Cord to tape.

Produce a $tape from $cord .a.

Accepts

.a is an $atom.

Produces

A $tape.

Source

Examples


+tuba

UTF-8 tape to UTF-32 tape.

Convert $tape to a +list of codepoints (@c).

Accepts

.a is a $tape.

Produces

A (list @c).

Source

Examples


+tufa

UTF-32 to UTF-8 tape.

Wrap a +list of UTF-32 codepoints into a UTF-8 $tape.

Accepts

.a is a (list @c).

Produces

A $tape.

Source

Examples


+tuft

UTF-32 to UTF-8.

Convert @c to $cord.

Accepts

.a is a @c.

Produces

A $cord.

Source

Examples


+wack

Knot escape.

Escape $knot ~ as ~~ and _ as ~-. Used for printing.

Accepts

.a is a $knot.

Produces

A $knot.

Source

Examples


+wick

Knot unescape.

Unescape $knot ~~ as ~ and ~- as _. Produces a +unit, which is null if the $knot contains unescaped ~ characters.

Accepts

.a is a an $atom.

Produces

A (unit @ta).

Source

Examples


+woad

Unescape cord.

Unescape $knot-encoded $cord.

Accepts

.a is a @ta.

Produces

A $cord.

Source

Examples


+wood

Escape cord.

Escape $cord .a so it can be encoded in a $knot.

Accepts

.a is a $cord.

Produces

A $knot.

Source

Examples


Last updated