Title:
callback version of listSort does not honor delimeters like ":" ,"|". Honors only ","
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): / ext-user (Suchika Singh)
Created: 09/01/2014
Components: Language
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: 290973 /
Priority/Frequency: Normal / Most users will encounter
Locale/System: English / Win XP All
Vote Count: 0
Problem:
callback version of listSort does not honor delimeters like ":" ,"|". Honors only ","
Method:Run the following code:
<cfscript>
mylist ="e:b:a:c:d";
sortedlist = ListSort( mylist, myComparator);
sortedlist_delimter = ListSort( mylist, myComparator, ":");
function myComparator(a, b)
{
if(a > b)
return 1;
else
return -1;
}
writeoutput("Unsorted List: " &mylist);
writeoutput("<br>");
writeoutput("Sorted list With two paramters:" & sortedlist);
writeoutput("<br>");
writeoutput("Sorted list With three paramters: " & sortedlist_delimter);
</cfscript>
Result:Unsorted List: e:b:a:c:d
Sorted list With two paramters:e:b:a:c:d
Sorted list With three paramters: e:b:a:c:d
Expected:
Unsorted List: e:b:a:c:d
Sorted list With two paramters:a:b:c:d:e
Sorted list With three paramters: a:b:c:d:e
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3815958
External Customer Info:
External Company:
External Customer Name:
External Customer Email:
Attachments:
Comments: