Project

General

Profile

Actions

Feature #12786

closed

String#casecmp?

Added by rringler (Ryan Ringler) over 7 years ago. Updated over 7 years ago.

Status:
Closed
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 1 (0 open1 closed)

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0