stdlibok
Structure
fn · h1main
comment
bind
`s` = hellobind
`n` = > len `s`call
> print text=`n`bind
`ty` = > type `s`call
> print text=`ty`comment
Trim, split, join, and index:
bind
`t` = > trim value= hi bind
`parts` = > split value=a,b sep=,bind
`mid` = > at value=`parts` index=0bind
`j` = > join value=`parts` sep=-call
> print text=`t`call
> print text=`mid`call
> print text=`j`Functions
Variables
-
j texta-ba-b
-
mid textaa
-
n int55
-
parts list · 2
# value 1 a 2 b # value 1 a 2 b -
s texthellohello
-
t texthihi
-
ty texttexttext
Execution
5
text
hi
a
a-b
Source
--- title: Built-ins len / str / int / type / trim / split / join / at description: Host builtins for strings and tables --- # main Length and type: **`s` = "hello"** **`n` = > len `s`** > print text=`n` **`ty` = > type `s`** > print text=`ty` Trim, split, join, and index: **`t` = > trim value=" hi "** **`parts` = > split value="a,b" sep=","** **`mid` = > at value=`parts` index=0** **`j` = > join value=`parts` sep="-"** > print text=`t` > print text=`mid` > print text=`j`
Length and type: