0 votes
in Ruby by
In how many ways you can compare Ruby string?

1 Answer

0 votes
by

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
...