marqdo

标准库ok

keywords/标准库.mq.md

Structure

fn · h1main
comment

长度与英文 type(类型无中文内核别名,见标准库文档):

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=0
bind `j` = > join value=`parts` sep=-
call> 打印 内容=`t`
call> 打印 内容=`mid`
call> 打印 内容=`j`
Functions
Variables
  • j text
    甲-乙
  • mid text
  • n int
    2
  • parts list · 2
    #value
    1
    2
  • s text
    你好
  • t text
  • ty text
    text

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`

Variable