String comparison: Difference between revisions
add RPL
(add RPL) |
|||
Line 3,889:
</syntaxhighlight>
=={{header|RPL}}==
Equality can be tested either with <code>==</code> or <code>SAME</code> operators:
"ab" "abc" ==
returns 0 (false).
To test inequality:
"ab" "abc" ≠
returns 1 (true).
Lexical order can be checked with <code><</code>, <code>≤</code>, <code>></code> or <code> ≥</code> operators.
"ab" "abc" ≤
returns also 1 (true).
All the above tests are case-sensitive.
=={{header|Ruby}}==
<syntaxhighlight lang="ruby">method_names = [:==,:!=, :>, :>=, :<, :<=, :<=>, :casecmp]
|