method
=~
=~(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
=~(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