mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
21 lines
725 B
Plaintext
21 lines
725 B
Plaintext
Returns a new string containing the downcased characters in +self+:
|
|
|
|
'HELLO'.downcase # => "hello"
|
|
'STRAẞE'.downcase # => "straße"
|
|
'ПРИВЕТ'.downcase # => "привет"
|
|
'RubyGems.org'.downcase # => "rubygems.org"
|
|
|
|
Some characters (and some character sets) do not have upcase and downcase versions;
|
|
see {Case Mapping}[rdoc-ref:case_mapping.rdoc]:
|
|
|
|
s = '1, 2, 3, ...'
|
|
s.downcase == s # => true
|
|
s = 'こんにちは'
|
|
s.downcase == s # => true
|
|
|
|
The casing is affected by the given +mapping+,
|
|
which may be +:ascii+, +:fold+, or +:turkic+;
|
|
see {Case Mappings}[rdoc-ref:case_mapping.rdoc@Case+Mappings].
|
|
|
|
Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String].
|