Title:
Constructs for substrings via array notations with ranges - character extractions
| View in TrackerI would love to be able to have a shortcut notation for accessing substrings via array notation with a combination of positional ranges instead of traditional clunky funcitons. Please see the examples below:
a = "hello luis majano";
a[ 1 ] -> produces h
a[1..5] -> produces hello
// You can also go backwards using negative ending positions
a[5..-2] -> produces llo
So basically the ranges are the starting to ending positions.
Attachments:
Comments: