File: titlecase_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 (16 lines) | stat: -rw-r--r-- 368 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -*- encoding: utf-8 -*-

require "unicode_utils/read_cdata"

module UnicodeUtils

  TITLECASE_LETTER_SET = Impl.read_code_point_set("cat_set_titlecase") # :nodoc:

  # True if the given character has the General_Category
  # Titlecase_Letter (Lt).
  def titlecase_char?(char)
    TITLECASE_LETTER_SET.include?(char.ord)
  end
  module_function :titlecase_char?

end