Sorry, it's me again...
I am right, the listSort function has no delim parameter like the other string list functions?
On most list functions you can use an delim paramter - and beacause my list entries have commas, I use this parameter many times. How can I sort my lists? Only solution I have would be to replace "," with some other strings, then create the list using "," as delim, sort it, replace the "," from the sorted list und dann replace "," back.
listSort and delim
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: listSort and delim
Yeah, never noticed that before. The good thing is that it's probably not a hard fix...Purzelkater wrote: ↑Wed Dec 11, 2019 12:20 pmSorry, it's me again...
I am right, the listSort function has no delim parameter like the other string list functions?
You could use Wiki: json.FromList() then Wiki: json.sort() then Wiki: json.toList().On most list functions you can use an delim paramter - and beacause my list entries have commas, I use this parameter many times. How can I sort my lists? Only solution I have would be to replace "," with some other strings, then create the list using "," as delim, sort it, replace the "," from the sorted list und dann replace "," back.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: listSort and delim
Not sure if I've ever used Wiki: listSort() but I just checked it does have a 3rd parameter. It's just not in the wiki.
edit: I updated the wiki to show the delimiter option.
Code: Select all
[listSort("b,a;a,b","a",";")]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools