Module: AdLint::Cpp::BasicSourceCharacterSet
- Defined in:
- lib/adlint/cpp/util.rb
Class Method Summary collapse
Class Method Details
.include?(str) ⇒ Boolean
70 71 72 |
# File 'lib/adlint/cpp/util.rb', line 70 def include?(str) str.chars.all? { |ch| CHARS.include?(ch.ord) } end |
.select_adapted(str) ⇒ Object
75 76 77 |
# File 'lib/adlint/cpp/util.rb', line 75 def select_adapted(str) str.chars.select { |ch| CHARS.include?(ch.ord) } end |
.select_not_adapted(str) ⇒ Object
80 81 82 |
# File 'lib/adlint/cpp/util.rb', line 80 def select_not_adapted(str) str.chars.to_a - select_adapted(str) end |