method
slice!
v2.3.8 -
Show latest stable
- Class:
ActiveSupport::Multibyte::Chars
slice!(*args)public
Like String#slice!, except instead of byte offsets you specify character offsets.
Example:
s = 'ããã«ã¡ã¯' s.mb_chars.slice!(2..3).to_s #=> "ã«ã¡" s #=> "ããã¯"