返回字符串表达式在开始索引和结束索引之间的子字符串。 如果未定义结束索引,则它介于开始索引和结束索引之间。
字符串
substr(<parameters>)
参数 | 类型 |
---|---|
字符串 | 字符串 |
beginIndex | 整数 |
endIndex | 整数 |
substr(<string>,<beginIndex>)
substr(<string>,<beginIndex>,<endIndex>)
返回字符串。
substr("Hello World",6)
返回“World”。
substr("Hello World", 0, 5)
返回“Hello”。