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

K
No edit summary
(K)
Line 936:
</pre>
 
=={{header|K}}==
{{works with|ngn/k}}<syntaxhighlight lang=K>{x@<_x}"This is a test"
" aehiisssTtt"
{x@<_x}"The sentence \"The quick brown fox jumps over the lazy dog\" uses every letter of the alphabet."
" \"\".aaabbccdeeeeeeeeeeeeeeffghhhhhijklllmnnnoooooppqrrrrssssTtTtttttuuuvvwxyyz"
{x@<x}"This is a test" / remove the _ to sort in ascii order rather than alphabetic order
" Taehiissstt"</syntaxhighlight>
=={{header|Lua}}==
<syntaxhighlight lang="lua">fcoll = {} -- forward collation
6,951

edits