Status/Resolution/Reason: To Test//Fixed
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 05/03/2014
Components: Language
Versions: 11.0
Failure Type: Enhancement Request
Found In Build/Fixed In Build: PublicBeta /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Platforms All
Vote Count: 6
G'day:
On Railo one can do this:
{code:java}
<cfscript>
s = "G'day world";
c = s[1];
writeDump(var=variables);
</cfscript>
{code}
And it outputs "G".
This is a step in the right direction of being able to treat strings like character arrays. ColdFusion should do this, and it should also add iteration functions which also treat a string like an array of characters, at least .each(), and probably .map(), but there's perhaps a use case for .sort(), .filter(), .reduce(), .some(), .every() too? Perhaps it should be on the basis of "in for a penny, in for a pound", and keep the "interface" to collection iteration functions uniform, even if the use case for some might be marginal?
--
Adam
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3754490
External Customer Info:
External Company:
External Customer Name: Adam Cameron.
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: