String comparison: Difference between revisions

→‎{{header|ooRexx}}: Show caseless comparison
(Add link to original source)
(→‎{{header|ooRexx}}: Show caseless comparison)
Line 487:
=={{header|ooRexx}}==
See the [[#NetRexx|NetRexx]] and/or the [[#REXX|REXX]] implementation.
 
There is a way to "caseless" compare array elements:
<lang>a=.array~of('A 1','B 2','a 3','b 3','A 5')
a~sortwith(.caselesscomparator~new)
Do i=1 To 5
Say a[i]
End</lang>
Output:
<pre>A 1
a 3
A 5
B 2
b 3</pre>
 
=={{header|PARI/GP}}==
2,298

edits