tracker issue : CF-4204498

select a category, or use search below
(searches all categories and all time range)

Constructs for substrings via array notations with ranges - character extractions

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): Luis M. / ()

Created: 06/11/2019

Components: Language

Versions: 2018

Failure Type:

Found In Build/Fixed In Build: /

Priority/Frequency: Normal /

Locale/System: /

Vote Count: 0

I 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.