Fixed
Details
Assignee
Michael OffnerMichael OffnerReporter
Brad WoodBrad WoodNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
NoneFix versions
Priority
New
Details
Details
Assignee
Michael Offner
Michael OffnerReporter
Brad Wood
Brad WoodNew Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
None
Fix versions
Priority
Created 20 October 2021 at 16:56
Updated 8 June 2023 at 08:47
Resolved 4 May 2022 at 10:29
Lucee's has String.map() and String.each() as aliases for String.listMap() and String.listEach() – see this ticket
https://luceeserver.atlassian.net/browse/LDEV-388
However, this is causing compat issues with Adobe which treats a string as a char array when using the non-"list" version of the function. Also, Adobe has String.reduce() which Lucee does not support at all.
So in short, ONLY these methods should use list functionality:
String.listMap()
String.listEach()
String.listReduce()
And each of these should treat the string as a char array, looping over each character.
String.map()
String.each()
String.reduce()
Compare the behavior of each engine with the following snippet of code:
<ul> <cfscript> days = "1,3,5"; days.each( (i) => writeOutput( '<li>#i#</li>' ) ); </cfscript> </ul>
https://trycf.com/gist/2bfaeedd77f232a5cd6a018a73e9c13d/lucee5
https://trycf.com/gist/574ca56f850631764b7429ffb00f21b9/acf2021