lib/chars/chars.rb in chars-0.1.1 vs lib/chars/chars.rb in chars-0.1.2
- old
+ new
@@ -37,129 +37,192 @@
'=', '|', '\\', '<', '>', '/']
# The space character set
SPACE = CharSet.new(' ', "\f", "\n", "\r", "\t", "\v")
+ # The set of printable characters (not including spaces)
+ VISIBLE = ALPHA_NUMERIC + ['\'', '"', '`', ',', ';', ':', '~', '-',
+ '(', ')', '[', ']', '{', '}', '.', '?', '!', '@', '#', '$',
+ '%', '^', '&', '*', '_', '+', '=', '|', '\\', '<', '>', '/']
+
# The set of printable characters (including spaces)
PRINTABLE = ALPHA_NUMERIC + PUNCTUATION + SYMBOLS + SPACE
# The control-char character set
CONTROL = CharSet.new(0..0x1f, 0x7f)
- # The ASCII character set
- ASCII = CharSet.new(0..0x7f)
+ # The signed ASCII character set
+ SIGNED_ASCII = CharSet.new(0..0x7f)
# The full 8-bit character set
- ALL = CharSet.new(0..0xff)
+ ASCII = CharSet.new(0..0xff)
#
- # The numeric decimal character set.
+ # The decimal-digit character set.
#
+ # @return [CharSet]
+ # The decimal-digit character set.
+ #
def Chars.numeric
NUMERIC
end
#
- # The octal character set.
+ # The octal-digit character set.
#
+ # @return [CharSet]
+ # The octal-digit character set.
+ #
def Chars.octal
OCTAL
end
#
# The upper-case hexadecimal character set.
#
+ # @return [CharSet]
+ # The upper-case hexadecimal character set.
+ #
def Chars.uppercase_hexadecimal
UPPERCASE_HEXADECIMAL
end
#
# The lower-case hexadecimal character set.
#
+ # @return [CharSet]
+ # The lower-case hexadecimal character set.
+ #
def Chars.lowercase_hexadecimal
LOWERCASE_HEXADECIMAL
end
#
# The hexadecimal character set.
#
+ # @return [CharSet]
+ # The hexadecimal character set.
+ #
def Chars.hexadecimal
HEXADECIMAL
end
#
- # The upper-case alpha character set.
+ # The upper-case alphabetic character set.
#
+ # @return [CharSet]
+ # The upper-case alphabetic character set.
+ #
def Chars.uppercase_alpha
UPPERCASE_ALPHA
end
#
- # The lower-case alpha character set.
+ # The lower-case alphabetic character set.
#
+ # @return [CharSet]
+ # The lower-case alphabetic character set.
+ #
def Chars.lowercase_alpha
LOWERCASE_ALPHA
end
#
- # The alpha character set.
+ # The alphabetic character set.
#
+ # @return [CharSet]
+ # The alphabetic character set.
+ #
def Chars.alpha
ALPHA
end
#
# The alpha-numeric character set.
#
+ # @return [CharSet]
+ # The alpha-numeric character set.
+ #
def Chars.alpha_numeric
ALPHA_NUMERIC
end
#
# The punctuation character set.
#
+ # @return [CharSet]
+ # The punctuation character set.
+ #
def Chars.punctuation
PUNCTUATION
end
#
# The symbolic character set.
#
+ # @return [CharSet]
+ # The symbolic character set.
+ #
def Chars.symbols
SYMBOLS
end
#
- # The space character set.
+ # The white-space character set.
#
+ # @return [CharSet]
+ # The white-space character set.
+ #
def Chars.space
SPACE
end
#
+ # The set of printable characters, not including spaces.
+ #
+ # @return [CharSet]
+ # The visible character set.
+ #
+ def Chars.visible
+ VISIBLE
+ end
+
+ #
# The set of printable characters, including spaces.
#
+ # @return [CharSet]
+ # The printable character set.
+ #
def Chars.printable
PRINTABLE
end
#
- # The control-char character set.
+ # The control-character character set.
#
+ # @return [CharSet]
+ # The control-character character set.
+ #
def Chars.control
CONTROL
end
#
- # The ASCII character set.
+ # The signed ASCII character set.
#
- def Chars.ascii
- ASCII
+ # @return [CharSet]
+ # The signed ASCII character set.
+ #
+ def Chars.signed_ascii
+ SIGNED_ASCII
end
#
- # The full 8-bit character set.
+ # The ASCII character set.
#
- def Chars.all
- ALL
+ # @return [CharSet]
+ # The ASCII character set.
+ #
+ def Chars.ascii
+ ASCII
end
end