标准库ok
Structure
fn · h1main
comment
bind
`s` = 你好bind
`n` = > 长度 值=`s`call
> 打印 内容=`n`bind
`ty` = > type `s`call
> 打印 内容=`ty`comment
去空白、拆分、拼接、按下标(主机名仍为英文):
bind
`t` = > trim value= 嗨 bind
`parts` = > split value=甲,乙 sep=,bind
`mid` = > at value=`parts` index=0bind
`j` = > join value=`parts` sep=-call
> 打印 内容=`t`call
> 打印 内容=`mid`call
> 打印 内容=`j`Functions
Variables
-
j text甲-乙甲-乙
-
mid text甲甲
-
n int22
-
parts list · 2
# value 1 甲 2 乙 # value 1 甲 2 乙 -
s text你好你好
-
t text嗨嗨
-
ty texttexttext
Execution
2
text
嗨
甲
甲-乙
Source
--- title: 内置 长度 / 文本 / 整数 与 trim 等 description: 主机内置;中文别名覆盖常用几个 --- # main 长度与英文 `type`(类型无中文内核别名,见标准库文档): **`s` = "你好"** **`n` = > 长度 值=`s`** > 打印 内容=`n` **`ty` = > type `s`** > 打印 内容=`ty` 去空白、拆分、拼接、按下标(主机名仍为英文): **`t` = > trim value=" 嗨 "** **`parts` = > split value="甲,乙" sep=","** **`mid` = > at value=`parts` index=0** **`j` = > join value=`parts` sep="-"** > 打印 内容=`t` > 打印 内容=`mid` > 打印 内容=`j`
长度与英文
type(类型无中文内核别名,见标准库文档):