Files
marqdo/public/keywords/stdlib.mq.md
T
cflmyandCursor 30cd39fd8f Add diagnostics spans, CLI/view input feeding, and len/str/int builtins.
Unify bytecode errors with path:line:col, support --stdin-file and live view preset stdin, and ship the S0 standard library with gold coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 17:26:09 +08:00

23 lines
362 B
Markdown

---
title: 内置 len / str / int
description: 长度与类型转换(S0 最小标准库)
---
# main
len 接受文本(按 Unicode 标量计)或表/列表:
*`s` = hello*
*`n` = > len `s`*
> print text=`n`
str 把值转成显示文本;int 解析整数(或把 True / False 当成 1 / 0):
*`t` = > str 7*
*`i` = > int `t`*
> print text=`i`