Module: Chars
- Defined in:
- lib/chars/chars.rb,
lib/chars/version.rb,
lib/chars/char_set.rb,
lib/chars/string_enumerator.rb
Defined Under Namespace
Classes: CharSet, StringEnumerator
Constant Summary collapse
- NUMERIC =
The numeric decimal character set
CharSet['0'..'9']
- DIGITS =
NUMERIC
- OCTAL =
The octal character set
CharSet['0'..'7']
- UPPERCASE_HEXADECIMAL =
The upper-case hexadecimal character set
NUMERIC | CharSet['A'..'F']
- LOWERCASE_HEXADECIMAL =
The lower-case hexadecimal character set
NUMERIC | CharSet['a'..'f']
- HEXADECIMAL =
The hexadecimal character set
UPPERCASE_HEXADECIMAL | LOWERCASE_HEXADECIMAL
- UPPERCASE_ALPHA =
The upper-case alpha character set
CharSet['A'..'Z']
- LOWERCASE_ALPHA =
The lower-case alpha character set
CharSet['a'..'z']
- ALPHA =
The alpha character set
UPPERCASE_ALPHA | LOWERCASE_ALPHA
- ALPHA_NUMERIC =
The alpha-numeric character set
ALPHA | NUMERIC
- PUNCTUATION =
The punctuation character set
CharSet['\'', '"', '`', ',', ';', ':', '~', '-', '(', ')', '[', ']', '{', '}', '.', '?', '!']
- SYMBOLS =
The symbolic character set
PUNCTUATION | CharSet[ '@', '#', '$', '%', '^', '&', '*', '_', '+', '=', '|', '\\', '<', '>', '/' ]
- WHITESPACE =
The space character set
CharSet[' ', "\f", "\n", "\r", "\t", "\v"]
- SPACE =
WHITESPACE
- VISIBLE =
The set of printable characters (not including spaces)
ALPHA_NUMERIC | CharSet[ '\'', '"', '`', ',', ';', ':', '~', '-', '(', ')', '[', ']', '{', '}', '.', '?', '!', '@', '#', '$', '%', '^', '&', '*', '_', '+', '=', '|', '\\', '<', '>', '/' ]
- PRINTABLE =
The set of printable characters (including spaces)
ALPHA_NUMERIC | PUNCTUATION | SYMBOLS | CharSet[' ']
- CONTROL =
The control-char character set
CharSet[0..0x1f, 0x7f]
- SIGNED_ASCII =
The signed ASCII character set
CharSet[0..0x7f]
- ASCII =
The full 8-bit character set
CharSet[0..0xff]
- VERSION =
chars version
'0.3.3'
Class Method Summary collapse
-
.alpha ⇒ CharSet
The alphabetic character set.
-
.alpha_numeric ⇒ CharSet
The alpha-numeric character set.
-
.ascii ⇒ CharSet
The ASCII character set.
-
.control ⇒ CharSet
The control-character character set.
-
.digits ⇒ CharSet
Alias for Chars.numeric.
-
.hexadecimal ⇒ CharSet
The hexadecimal character set.
-
.lowercase_alpha ⇒ CharSet
The lower-case alphabetic character set.
-
.lowercase_hexadecimal ⇒ CharSet
The lower-case hexadecimal character set.
-
.numeric ⇒ CharSet
The decimal-digit character set.
-
.octal ⇒ CharSet
The octal-digit character set.
-
.printable ⇒ CharSet
The set of printable characters, including spaces.
-
.punctuation ⇒ CharSet
The punctuation character set.
-
.signed_ascii ⇒ CharSet
The signed ASCII character set.
-
.space ⇒ CharSet
The whitespace character set.
-
.symbols ⇒ CharSet
The symbolic character set.
-
.uppercase_alpha ⇒ CharSet
The upper-case alphabetic character set.
-
.uppercase_hexadecimal ⇒ CharSet
The upper-case hexadecimal character set.
-
.visible ⇒ CharSet
The set of printable characters, not including spaces.
-
.whitespace ⇒ CharSet
The whitespace character set.
Class Method Details
.alpha ⇒ CharSet
The alphabetic character set.
181 182 183 |
# File 'lib/chars/chars.rb', line 181 def self.alpha ALPHA end |
.alpha_numeric ⇒ CharSet
The alpha-numeric character set.
193 194 195 |
# File 'lib/chars/chars.rb', line 193 def self.alpha_numeric ALPHA_NUMERIC end |
.ascii ⇒ CharSet
The ASCII character set.
302 303 304 |
# File 'lib/chars/chars.rb', line 302 def self.ascii ASCII end |
.control ⇒ CharSet
The control-character character set.
278 279 280 |
# File 'lib/chars/chars.rb', line 278 def self.control CONTROL end |
.digits ⇒ CharSet
Alias for numeric.
97 98 99 |
# File 'lib/chars/chars.rb', line 97 def self.digits numeric end |
.hexadecimal ⇒ CharSet
The hexadecimal character set.
145 146 147 |
# File 'lib/chars/chars.rb', line 145 def self.hexadecimal HEXADECIMAL end |
.lowercase_alpha ⇒ CharSet
The lower-case alphabetic character set.
169 170 171 |
# File 'lib/chars/chars.rb', line 169 def self.lowercase_alpha LOWERCASE_ALPHA end |
.lowercase_hexadecimal ⇒ CharSet
The lower-case hexadecimal character set.
133 134 135 |
# File 'lib/chars/chars.rb', line 133 def self.lowercase_hexadecimal LOWERCASE_HEXADECIMAL end |
.numeric ⇒ CharSet
The decimal-digit character set.
83 84 85 |
# File 'lib/chars/chars.rb', line 83 def self.numeric NUMERIC end |
.octal ⇒ CharSet
The octal-digit character set.
109 110 111 |
# File 'lib/chars/chars.rb', line 109 def self.octal OCTAL end |
.printable ⇒ CharSet
The set of printable characters, including spaces.
266 267 268 |
# File 'lib/chars/chars.rb', line 266 def self.printable PRINTABLE end |
.punctuation ⇒ CharSet
The punctuation character set.
205 206 207 |
# File 'lib/chars/chars.rb', line 205 def self.punctuation PUNCTUATION end |
.signed_ascii ⇒ CharSet
The signed ASCII character set.
290 291 292 |
# File 'lib/chars/chars.rb', line 290 def self.signed_ascii SIGNED_ASCII end |
.space ⇒ CharSet
The whitespace character set.
242 243 244 |
# File 'lib/chars/chars.rb', line 242 def self.space whitespace end |
.symbols ⇒ CharSet
The symbolic character set.
217 218 219 |
# File 'lib/chars/chars.rb', line 217 def self.symbols SYMBOLS end |
.uppercase_alpha ⇒ CharSet
The upper-case alphabetic character set.
157 158 159 |
# File 'lib/chars/chars.rb', line 157 def self.uppercase_alpha UPPERCASE_ALPHA end |
.uppercase_hexadecimal ⇒ CharSet
The upper-case hexadecimal character set.
121 122 123 |
# File 'lib/chars/chars.rb', line 121 def self.uppercase_hexadecimal UPPERCASE_HEXADECIMAL end |
.visible ⇒ CharSet
The set of printable characters, not including spaces.
254 255 256 |
# File 'lib/chars/chars.rb', line 254 def self.visible VISIBLE end |
.whitespace ⇒ CharSet
The whitespace character set.
231 232 233 |
# File 'lib/chars/chars.rb', line 231 def self.whitespace WHITESPACE end |