marqdo

Built-ins len / str / int / type / trim / split / join / atok

keywords/stdlib.mq.md

文档

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
Functions
Variables
  • description text
    Host builtins for strings and tables
  • j text
    a-b
  • markup text
    occlusion
  • mid text
    a
  • n int
    5
  • parts list · 2
    #value
    1a
    2b
  • s text
    hello
  • t text
    hi
  • title text
    Built-ins len / str / int / type / trim / split / join / at
  • ty text
    text
可执行知识(辅助)

运行与结果

5 text hi a a-b
完整源码
---
markup: occlusion
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`

Variable