String comparison: Difference between revisions
Content added Content deleted
(Added bash solution) |
(Added output for Unix Shell solution) |
||
Line 510: | Line 510: | ||
compare 50 20 |
compare 50 20 |
||
</lang> |
</lang> |
||
{{out}} |
|||
<pre> |
|||
'foo' and 'foo' are lexically equal |
|||
'foo' and 'foo' are equal with case insensitivity |
|||
'foo' and 'bar' are not lexically equal |
|||
'foo' is lexically after 'bar' |
|||
'FOO' and 'foo' are not lexically equal |
|||
'FOO' is lexically before 'foo' |
|||
'FOO' and 'foo' are equal with case insensitivity |
|||
'24' and '123' are not lexically equal |
|||
'24' is lexically after '123' |
|||
24 is numerically less than 123 |
|||
'50' and '20' are not lexically equal |
|||
'50' is lexically after '20' |
|||
50 is numerically greater than 20 |
|||
</pre> |
|||
{{omit from|Brlcad}} |
{{omit from|Brlcad}} |