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

Added Easylang
m (→‎{{header|Wren}}: Changed to Wren S/H)
(Added Easylang)
 
Line 505:
<pre>Now is the time for all good men to come to the aid of their country.
.Naaccddeeeeeeffghhhiiiillmmmnnooooooooorrrstttttttuwy</pre>
 
=={{header|EasyLang}}==
<syntaxhighlight>
func$ sort s$ .
d$[] = strchars s$
for i = 1 to len d$[] - 1
for j = i + 1 to len d$[]
if strcmp d$[j] d$[i] < 0
swap d$[j] d$[i]
.
.
.
return strjoin d$[]
.
print sort "The quick brown fox jumps over the lazy dog, apparently"
</syntaxhighlight>
{{out}}
<pre>
,Taaabcdeeeefghhijkllmnnoooopppqrrrsttuuvwxyyz
</pre>
 
=={{header|Eiffel}}==
2,083

edits