tracker issue : CF-4199392

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

Constructs for substrings via array notations with ranges

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Luis Majano / Luis Majano ()

Created: 08/01/2017

Components: Language

Versions: 2018

Failure Type: Others

Found In Build/Fixed In Build: / CF2018U5

Priority/Frequency: Normal /

Locale/System: / Linux All

Vote Count: 1

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 functions.  Please see the examples below:

{code}
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
{code}

So basically the ranges are the starting to ending positions.

Attachments:

Comments:

++++++++1
Vote by sana u.
477 | August 04, 2017 03:54:19 PM GMT