Given a String and specified parameters, returns a part of that String.
subString(string, start[, length])
- string - the String value from which to derive the returned String
- start - the starting index of the returned String
- length - (optional) the length of the returned String
- Return type: String
subString("Piece of cake.", 2) returns "ece of cake."
subString("Piece of cake.", 2, 3) returns "ece"
Supported data types
If a String value is passed, that value will be interpreted beginning with the start index. If a length is provided, the returned String will contain that many characters, beginning with the index. If not, the returned String will contain all remaining characters beginning with the index.
Unsupported data types
Unsupported data types return Null.
Updated 03 May 2023
Did this page help you?