Jump to content

String comparison: Difference between revisions

m
(Added Quackery.)
Line 2,983:
<pre>/O> ( compare two strings for equality )
... $ "abc" $ "xyz" =
... echo ( 0 = truefalse, 1 = falsetrue )
...
0
Line 2,990:
/O> ( compare two strings for inequality )
... $ "abc" $ "xyz" !=
... echo ( 0 = truefalse, 1 = falsetrue )
...
1
Line 2,997:
//O> ( compare two strings to see if one is lexically ordered before the other )
... $ "abc" $ "xyz" $<
... echo ( 0 = truefalse, 1 = falsetrue )
...
1
Line 3,004:
/O> ( compare two strings to see if one is lexically ordered after the other )
... $ "abc" $ "xyz" swap $>
... echo ( 0 = truefalse, 1 = falsetrue )
...
1
Line 3,012:
... [ $ "" swap witheach [ upper join ] ] is upper$ ( $ --> $ )
... $ "AbC" upper$ $ "aBc" upper$ =
... echo ( 0 = truefalse, 1 = falsetrue )
...
1
1,462

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.