SUB

Member Of Menu: 
String
List
Argument Types: 
Real
List
String
Result Type(s): 
List
String
Invertible: 
No
Valid In Expression: 
No
Stack Diagram: 
String1 Real2 Real3 String4
List1 Real2 Real3 List4

This operation extracts a substring or a sub-list from a string or a list. If it is provided a string and two real indices, it will return a substring between those two indices. The first character in the string begins at index 1. If Real3 is less than Real2 then an empty string is returned.

Similarly, this operation can extract a subset of the items of a list. If Real3 is less than Real2 then an empty list is returned. Otherwise, the items between these two indices is returned. Note that the first item in the list is considered to be at index 1.