class ActiveSupport::Multibyte::Chars
def slice!(*args)
string.mb_chars.slice!(0..3) # => #
string # => 'Welome'
string.mb_chars.slice!(3) # => #
string = 'Welcome'
modified if the range given is out of bounds
Chars, or +nil+ if the string was not modified. The string will not be
Works like String#slice!, but returns an instance of
def slice!(*args) string_sliced = @wrapped_string.slice!(*args) if string_sliced chars(string_sliced) end end