String case: Difference between revisions

Content deleted Content added
Steenslag (talk | contribs)
→‎{{header|Ruby}}: added non ascii example
Line 2,051: Line 2,051:


=={{header|Ruby}}==
=={{header|Ruby}}==
{{works with|Ruby| 1.8}}
<lang ruby>"alphaBETA".downcase # => "alphabeta"
<lang ruby>"alphaBETA".downcase # => "alphabeta"
"alphaBETA".upcase # => "ALPHABETA"
"alphaBETA".upcase # => "ALPHABETA"
Line 2,059: Line 2,058:


These methods used to affect ASCII letters A-Z and a-z only. From Ruby 2.4 onward however, these methods support Full Unicode case mapping, suitable for most languages, by default. (Options can be specified for Turkic, Lithuanian and ascii)
These methods used to affect ASCII letters A-Z and a-z only. From Ruby 2.4 onward however, these methods support Full Unicode case mapping, suitable for most languages, by default. (Options can be specified for Turkic, Lithuanian and ascii)
{{works with|Ruby| 2.4}}
<lang ruby>'ĥåçýджк'.upcase # => "ĤÅÇÝДЖК"</lang>


=={{header|Rust}}==
=={{header|Rust}}==