module Stringprep
Constants
- VERSION
Public Instance Methods
Determine whether code is in tableA.1 (Unassigned code points in Unicode 3.2).
# File lib/stringprep.rb, line 5 def in_a1(code) @a1 ||= Table::In.create_read_only(Rfc3454.tables['a1']) @a1.include?(code) end
Determine whether code is in tableB.1 (Commonly mapped to nothing).
# File lib/stringprep.rb, line 11 def in_b1(code) @b1 ||= Table::In.create_read_only(Rfc3454.tables['b1']) @b1.include?(code) end
Determine whether code is in tableC.1.1 (ASCII space characters).
# File lib/stringprep.rb, line 29 def in_c11(code) @c11 ||= Table::In.create_read_only(Rfc3454.tables['c11']) @c11.include? code end
Determine whether code is in tableC.1 (Space characters, union of C.1.1 and C.1.2).
# File lib/stringprep.rb, line 41 def in_c11_c12(code) in_c11(code) || in_c12(code) end
Determine whether code is in tableC.1.2 (Non-ASCII space characters).
# File lib/stringprep.rb, line 35 def in_c12(code) @c12 ||= Table::In.create_read_only(Rfc3454.tables['c12']) @c12.include? code end
Determine whether code is in tableC.2.1 (ASCII control characters).
# File lib/stringprep.rb, line 46 def in_c21(code) @c21 ||= Table::In.create_read_only(Rfc3454.tables['c21']) @c21.include? code end
Determine whether code is in tableC.2 (Control characters, union of C.2.1 and C.2.2).
# File lib/stringprep.rb, line 58 def in_c21_c22(code) in_c21(code) || in_c22(code) end
Determine whether code is in tableC.2.2 (Non-ASCII control characters).
# File lib/stringprep.rb, line 52 def in_c22(code) @c22 ||= Table::In.create_read_only(Rfc3454.tables['c22']) @c22.include? code end
Determine whether code is in tableC.3 (Private use).
# File lib/stringprep.rb, line 63 def in_c3(code) @c3 ||= Table::In.create_read_only(Rfc3454.tables['c3']) @c3.include?(code) end
Determine whether code is in tableC.4 (Non-character code points).
# File lib/stringprep.rb, line 69 def in_c4(code) @c4 ||= Table::In.create_read_only(Rfc3454.tables['c4']) @c4.include?(code) end
Determine whether code is in tableC.5 (Surrogate codes).
# File lib/stringprep.rb, line 75 def in_c5(code) @c5 ||= Table::In.create_read_only(Rfc3454.tables['c5']) @c5.include?(code) end
Determine whether code is in tableC.6 (Inappropriate for plain text).
# File lib/stringprep.rb, line 81 def in_c6(code) @c6 ||= Table::In.create_read_only(Rfc3454.tables['c6']) @c6.include?(code) end
Determine whether code is in tableC.7 (Inappropriate for canonical representation).
# File lib/stringprep.rb, line 87 def in_c7(code) @c7 ||= Table::In.create_read_only(Rfc3454.tables['c7']) @c7.include?(code) end
Determine whether code is in tableC.8 (Change display properties or are deprecated).
# File lib/stringprep.rb, line 93 def in_c8(code) @c8 ||= Table::In.create_read_only(Rfc3454.tables['c8']) @c8.include?(code) end
Determine whether code is in tableC.9 (Tagging characters).
# File lib/stringprep.rb, line 99 def in_c9(code) @c9 ||= Table::In.create_read_only(Rfc3454.tables['c9']) @c9.include?(code) end
Determine whether code is in tableD.1 (Characters with bidirectional property “R” or “AL”).
# File lib/stringprep.rb, line 105 def in_d1(code) @d1 ||= Table::In.create_read_only(Rfc3454.tables['d1']) @d1.include?(code) end
Determine whether code is in tableD.2 (Characters with bidirectional property “L”).
# File lib/stringprep.rb, line 111 def in_d2(code) @d2 ||= Table::In.create_read_only(Rfc3454.tables['d2']) @d2.include?(code) end
Return the mapped value for code according to tableB.2 (Mapping for case-folding used with NFKC).
# File lib/stringprep.rb, line 17 def map_b2(code) @b2 ||= Table::Map.create_read_only(Rfc3454.tables['b2']) @b2.map(code) end
Return the mapped value for code according to tableB.3 (Mapping for case-folding used with no normalization).
# File lib/stringprep.rb, line 23 def map_b3(code) @b3 ||= Table::Map.create_read_only(Rfc3454.tables['b3']) @b3.map(code) end