-
Notifications
You must be signed in to change notification settings - Fork 492
Closed
Description
Is your feature request related to a problem? Please describe.
Currently, there is no way to iterate over a string using Language Generation / Common Expression Language. This issue spawns from a StackOverflow question. Basically, they want to be able to pull numbers out of strings, such that:
- "hey 1234" becomes "1234"
- "xyz1234" becomes "1234"
Describe the solution you'd like
Ideally, array() could turn a string into an array, so that it can be iterated over.
Describe alternatives you've considered
Alternatively, split(<string>, <delimiter>) could accept a null or wildcard delimiter, which would just split every character. It looks like that may have been considered.
Additional context
In my own testing, with var test = "hey, 1234",
array(test)=[ 'hey, 1234' ]createArray(test)=[ 'hey, 1234' ]split(test, null)=[ 'hey,' '1234']split(test, "")=[ 'hey,' '1234']split(test, string.Empty)=[ 'hey,' '1234']
[enhancement]
tdurnford, eduardmartos and boydc2014
Metadata
Metadata
Assignees
Labels
R8Release 8 - March 16th, 2020Release 8 - March 16th, 2020