Useful API Functions
String
Copying
Notice: except when written otherwise, all indices are 1-based. Valid indices range from 1 to the string's size.
copyFrom:to:
aString copyFrom:startIndex to:endIndex 'áString.copyFrom_to(startIndex, endIndex) [JS]
Example:
'hello world' copyFrom:1 to:5. => 'hello'
copyFrom:
aString copyFrom:startIndex'
Example:
'hello world' copyFrom:6. => ' world'
copyTo:
aString copyTo:endIndex
Example:
'hello world' copyTo:6. => 'hello '