返回開始索引和結束索引之間字串表達式的子字串。 如果未定義結束索引,則它介於開始索引和結束之間。
字串
substr(<parameters>)
參數 | type |
---|---|
字串 | 字串 |
beginIndex | 整數 |
結束索引 | 整數 |
substr(<string>,<beginIndex>)
substr(<string>,<beginIndex>,<endIndex>)
返回字串。
substr("Hello World",6)
返回"World"。
substr("Hello World", 0, 5)
返回"Hello"。