substr

上次更新: 2023-08-17
  • 主题:
  • Journeys
    查看有关此主题的更多信息
  • 创建对象:
  • Experienced
    Developer

返回字符串表达式在开始索引和结束索引之间的子字符串。 如果未定义结束索引,则它介于开始索引和结束索引之间。

类别

字符串

函数语法

substr(<parameters>)

参数

参数 类型
字符串 字符串
beginindex 整数
endIndex 整数

签名和返回的类型

substr(<string>,<beginIndex>)

substr(<string>,<beginIndex>,<endIndex>)

返回字符串。

示例

substr("Hello World",6)

返回“World”。

substr("Hello World", 0, 5)

返回“Hello”。

在此页面上