Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 389 Bytes

File metadata and controls

14 lines (11 loc) · 389 Bytes

Letter Casing in Ruby

Letter casing functionality with Unicode semantics is not available in the core language, only ASCII semantics. The Ruby gem unicode_utils provides this functionality.

require 'unicode_utils'

lowercase = UnicodeUtils.downcase(str)
uppercase = UnicodeUtils.upcase(str)
titlecase = UnicodeUtils.titlecase(str)
casefold  = UnicodeUtils.casefold(str)