Extracting parts of strings
Judith C. Miller · 1985
You can see that any part of the string can be extracted (taken out) by using numbers in brackets by the side of the string. For example (1 to 3) means print all the characters from the first which is ‘a’ to the third which is ‘c’, so the result is ‘abc’. If there is only one number in the bracket, as in line 50, this means just print the character at that number, in this case the fourth which is ‘d’. Open image in new window