Title:
Add includeEmptyFields parameter to ReplaceList (as per ListToArray and others)
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Peter Boughton / Peter Boughton (Peter Boughton)
Created: 01/24/2013
Components: Language
Versions: 10.0
Failure Type: Enhancement Request
Found In Build/Fixed In Build: Final / 290471
Priority/Frequency: Major / All users will encounter
Locale/System: English / Platforms All
Vote Count: 2
Problem Description:
It is not possible to remove strings using ReplaceList, since empty list elements are ignored.
An extra parameter should be added, as several List~ functions have, to enable empty list elements to be preserved.
For details, see http://stackoverflow.com/questions/14506716/coldfusion-replacelist-reorders-returned-string
Steps to Reproduce:
<cfset Filename = apost's & pound#.JPG />
<cfset NewFilename = replacelist(Filename,"',##,&, ",",,and,-") />
Actual Result:
apostandspound-.JPG
Expected Result:
aposts-and-pound.jpg
Any Workarounds:
<cfset NewFilename = rereplace(Filename,"['##]","","all") />
<cfset NewFilename = replacelist(NewFilename,"&, ","and,-") />
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3489021
External Customer Info:
External Company:
External Customer Name: boughtonp
External Customer Email:
External Test Config: CF10
Attachments:
Comments: