Data & text · BUILT-IN MODULE
text
Text manipulation helpers.
Quick start
use text
words = text.split "SE is simple" " "
say text.join words "-"
say text.trim " hello "API reference
text.trim textTrim surrounding whitespace.
移除文字前後空白。
text.contains text searchCheck whether Text contains a substring.
檢查 Text 是否包含子字串。
text.starts text prefixCheck a prefix.
檢查文字開頭。
text.ends text suffixCheck a suffix.
檢查文字結尾。
text.replace text old newReplace text.
替換文字。
text.split text separatorSplit Text into a List.
將 Text 切割成 List。
text.join values separatorJoin values using a separator.
使用分隔符號連接值。
text.repeat text countRepeat Text.
重複 Text。