class method self.in_char_class?

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

self.in_char_class?(codepoint, classes)

Detect whether the codepoint is in a certain character class. Returns true when it’s in the specified character class and false otherwise. Valid character classes are: :cr, :lf, :l, :v, :lv, :lvt and :t.

Primarily used by the grapheme cluster support.

Parameters

codepoint req
classes req
Source
# File activesupport/lib/active_support/multibyte/chars.rb, line 457
        def in_char_class?(codepoint, classes)
          classes.detect { |c| UCD.boundary[c] === codepoint } ? true : false
        end

Defined in activesupport/lib/active_support/multibyte/chars.rb line 457 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Multibyte::Chars

Type at least 2 characters to search.

↑↓ navigate · open · esc close