Project

General

Profile

Feature #12786

String#casecmp?

Added by rringler (Ryan Ringler) almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:77375]

Description

Description

I would find String#casecmp? convenience method handy. I don't believe I've ever called String#casecmp without chaining #zero? to the result.

'abc'.casecmp?('ABC') #=> true
'abc'.casecmp?('DEF') #=> false

Files

string_casecmp_.patch (4.97 KB) string_casecmp_.patch rringler (Ryan Ringler), 09/24/2016 03:55 AM

Related issues

Related to Ruby master - Feature #14055: String#casecmp should use Unicode foldingRejectedActions

Also available in: Atom PDF