File: //usr/local/rvm/gems/ruby-2.7.4/doc/activesupport-6.1.4.1/ri/String/mb_chars-i.ri
U:RDoc::AnyMethod[iI"
mb_chars:ETI"String#mb_chars;TF:publico:RDoc::Markup::Document:@parts[S:RDoc::Markup::Heading:
leveli: textI"Multibyte proxy;To:RDoc::Markup::BlankLine o:RDoc::Markup::Paragraph; [I"=+mb_chars+ is a multibyte safe proxy for string methods.;T@
o;; [I"[It creates and returns an instance of the ActiveSupport::Multibyte::Chars class which ;TI"rencapsulates the original string. A Unicode safe version of all the String methods are defined on this proxy ;TI"nclass. If the proxy class doesn't respond to a certain method, it's forwarded to the encapsulated string.;T@
o:RDoc::Markup::Verbatim; [I"">> "lj".mb_chars.upcase.to_s
;TI"
=> "LJ"
;T:@format0o;; [I"CNOTE: Ruby 2.4 and later support native Unicode case mappings:;T@
o;; [I">> "lj".upcase
;TI"
=> "LJ"
;T;0S;
;i;I"Method chaining;T@
o;; [I"oAll the methods on the Chars proxy which normally return a string will return a Chars object. This allows ;TI";method chaining on the result of any of these methods.;T@
o;; [I"*name.mb_chars.reverse.length # => 12
;T;0S;
;i;I"'Interoperability and configuration;T@
o;; [I"tThe Chars object tries to be as interchangeable with String objects as possible: sorting and comparing between ;TI"rString and Char work like expected. The bang! methods change the internal string representation in the Chars ;TI"Qobject. Interoperability problems can be resolved easily with a +to_s+ call.;T@
o;; [I"pFor more information about the methods defined on the Chars proxy see ActiveSupport::Multibyte::Chars. For ;TI"ainformation about how to change the default Multibyte behavior see ActiveSupport::Multibyte.;T:
@fileI"4lib/active_support/core_ext/string/multibyte.rb;T:0@omit_headings_from_table_of_contents_below000[ I"();T@5FI"String;TcRDoc::NormalClass00