A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.ruby-lang.org/en/3.1/doc/case_mapping_rdoc.html below:

case_mapping - RDoc Documentation

Case Mapping

Some string-oriented methods use case mapping.

In String:

In Symbol:

Default Case Mapping

By default, all of these methods use full Unicode case mapping, which is suitable for most languages. See Unicode Latin Case Chart.

Non-ASCII case mapping and folding are supported for UTF-8, UTF-16BE/LE, UTF-32BE/LE, and ISO-8859-1~16 Strings/Symbols.

Context-dependent case mapping as described in Table 3-17 of the Unicode standard is currently not supported.

In most cases, case conversions of a string have the same number of characters. There are exceptions (see also :fold below):

s = "\u00DF" 
s.upcase     
s = "\u0149" 
s.upcase     

Case mapping may also depend on locale (see also :turkic below):

s = "\u0049"        
s.downcase          
s.downcase(:turkic) 

Case changes may not be reversible:

s = 'Hello World!' 
s.downcase         
s.downcase.upcase  

Case changing methods may not maintain Unicode normalization. See String#unicode_normalize).

Options for Case Mapping

Except for casecmp and casecmp?, each of the case-mapping methods listed above accepts optional arguments, *options.

The arguments may be:

The options:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4