Class: UnicodeUtils::Impl::AfterSoftDottedConditionalCasing

Inherits:
ConditionalCasing show all
Defined in:
lib/unicode_utils/conditional_casing.rb

Instance Attribute Summary

Attributes inherited from ConditionalCasing

#mapping

Instance Method Summary collapse

Methods inherited from ConditionalCasing

#initialize

Constructor Details

This class inherits a constructor from UnicodeUtils::Impl::ConditionalCasing

Instance Method Details

#context_match?(str, pos) ⇒ Boolean

Returns:

  • (Boolean)


81
82
83
84
85
86
87
88
89
# File 'lib/unicode_utils/conditional_casing.rb', line 81

def context_match?(str, pos)
  (pos - 1).downto(0) { |i|
    c = str[i]
    return true if UnicodeUtils.soft_dotted_char?(c)
    cc = UnicodeUtils.combining_class(c)
    return false if cc == 0 || cc == 230
  }
  false
end