File: uppercase_char_q.rb

package info (click to toggle)
ruby-unicode-utils 1.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 1,988 kB
  • sloc: ruby: 1,877; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 349 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -*- encoding: utf-8 -*-

require "unicode_utils/read_cdata"

module UnicodeUtils

  PROP_UPPERCASE_SET = Impl.read_code_point_set("prop_set_uppercase") # :nodoc:

  # True if the given character has the Unicode property Uppercase.
  def uppercase_char?(char)
    PROP_UPPERCASE_SET.include?(char.ord)
  end
  module_function :uppercase_char?

end