String: case insensitive comparison

All:

I noticed that use of $= to enable case insensitive string comparison
is being deprecated. What is to be used in it’s place?

(PS: I realize that RE’s could be used, but I was wondering if there is
a better way to perform case insensitive string comparisons?
(i.e. a new operator))

As always, any help is greatly appreciated. :slight_smile:

Regards,
Brad

Brad wrote:

I noticed that use of $= to enable case insensitive string comparison
is being deprecated. What is to be used in it’s place?

irb(main):001:0> [“aaa” <=> “Aaa”, “aaa”.casecmp(“Aaa”)]
=> [1, 0]

Regards,
Brad

More Regards,
Florian Gross

Florian Gross wrote:

Brad wrote:

I noticed that use of $= to enable case insensitive string comparison
is being deprecated. What is to be used in it’s place?

irb(main):001:0> [“aaa” <=> “Aaa”, “aaa”.casecmp(“Aaa”)]
=> [1, 0]

Regards,
Brad

More Regards,
Florian Gross

Florian:

Thanks for the quick and informative response!
I do appreciate the assistance. :slight_smile:

Regards,
Brad