Sort the letters of string in alphabetical order: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
(→‎{{header|Quackery}}: fixed to comply with task requirements)
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
Line 1,441:
=={{header|Wren}}==
Well, we'll write a function for a bubble sort which we don't have in Wren-sort because it's normally much slower than the other methods. However, it's fast enough here.
<syntaxhighlight lang="ecmascriptwren">var bubbleSort = Fn.new { |s, trim| // allow optional removal of whitespace
var chars = s.toList
var n = chars.count
9,476

edits