Login
Remember
Register
Ask a Question
In how many ways you can compare Ruby string?
0
votes
asked
Nov 14, 2021
in
Ruby
by
sharadyadav1986
In how many ways you can compare Ruby string?
compare-stringruby
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Nov 14, 2021
by
sharadyadav1986
Ruby strings can be compared with three operators:
With == operator : Returns true or false
With eql? Operator : Returns true or false
With casecmp method : Returns 0 if matched or 1 if not matched
...