method

slice

Importance_1
v3.1.0 - Show latest stable - 0 notes - Class: ActiveSupport::Multibyte::Chars
slice(*args) public

Implements Unicode-aware slice with codepoints. Slicing on one point returns the codepoints for that character.

Example:

'こんにちは'.mb_chars.slice(2..3).to_s # => "にち"
Show source
Register or log in to add new notes.