method

=~

Importance_1
v2.3.8 - 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.