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

require "unicode_utils/lowercase_char_q"
require "unicode_utils/uppercase_char_q"
require "unicode_utils/titlecase_char_q"

module UnicodeUtils

  # A cased char is a character that has the Unicode property
  # Lowercase or Uppercase or the general category Titlecase_Letter.
  #
  # See also: lowercase_char?, uppercase_char?, titlecase_char?
  def cased_char?(char)
    lowercase_char?(char) || uppercase_char?(char) || titlecase_char?(char)
  end
  module_function :cased_char?

end