method

=~

Importance_1
v3.2.1 - Show latest stable - 0 notes - Class: ActiveSupport::Multibyte::Chars
=~(other) public

Like String#=~ only it returns the character offset (in codepoints) instead of the byte offset.

Example:

'Café périferôl'.mb_chars =~ /ô/ # => 12
Show source
Register or log in to add new notes.