Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/chars/extensions/string.rb

Instance Method Summary collapse

Instance Method Details

#alpha?Boolean

Determines whether the String belongs to the alphabetic character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the alphabetic character set.

See Also:



115
116
117
# File 'lib/chars/extensions/string.rb', line 115

def alpha?
  Chars::ALPHA === self
end

#alpha_numeric?Boolean

Determines whether the String belongs to the alpha-numeric character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the alpha-numeric character set.

See Also:



130
131
132
# File 'lib/chars/extensions/string.rb', line 130

def alpha_numeric?
  Chars::ALPHA_NUMERIC === self
end

#ascii?Boolean

Determines whether the String belongs to the ASCII character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the ASCII character set.

See Also:



237
238
239
# File 'lib/chars/extensions/string.rb', line 237

def ascii?
  Chars::ASCII === self
end

#control?Boolean

Determines whether the String belongs to the control-character character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the control-character character set.

See Also:



210
211
212
# File 'lib/chars/extensions/string.rb', line 210

def control?
  Chars::CONTROL === self
end

#hex?Boolean

Determines whether the String belongs to the hexadecimal character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the hexadecimal character set.

See Also:



72
73
74
# File 'lib/chars/extensions/string.rb', line 72

def hex?
  Chars::HEXADECIMAL === self
end

#lowercase_alpha?Boolean

Determines whether the String belongs to the lower-case alphabetic character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the lower-case alphabetic character set.

See Also:



102
103
104
# File 'lib/chars/extensions/string.rb', line 102

def lowercase_alpha?
  Chars::LOWERCASE_ALPHA === self
end

#lowercase_hex?Boolean

Determines whether the String belongs to the lower-case hexadecimal character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the lower-case hexadecimal character set.

See Also:



59
60
61
# File 'lib/chars/extensions/string.rb', line 59

def lowercase_hex?
  Chars::LOWERCASE_HEXADECIMAL === self
end

#numeric?Boolean

Determines whether the String belongs to the decimal-digit character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the decimal-digit character set.

See Also:



15
16
17
# File 'lib/chars/extensions/string.rb', line 15

def numeric?
  Chars::NUMERIC === self
end

#octal?Boolean

Determines whether the String belongs to the octal-digit character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the octal-digit character set.

See Also:



29
30
31
# File 'lib/chars/extensions/string.rb', line 29

def octal?
  Chars::OCTAL === self
end

#printable?Boolean

Determines whether the String belongs to the printable character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the printable character set.

See Also:



195
196
197
# File 'lib/chars/extensions/string.rb', line 195

def printable?
  Chars::PRINTABLE === self
end

#punctuation?Boolean

Determines whether the String belongs to the punctuation character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the punctuation character set.

See Also:



143
144
145
# File 'lib/chars/extensions/string.rb', line 143

def punctuation?
  Chars::PUNCTUATION === self
end

#signed_ascii?Boolean

Determines whether the String belongs to the signed-ASCII character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the signed-ASCII character set.

See Also:



224
225
226
# File 'lib/chars/extensions/string.rb', line 224

def signed_ascii?
  Chars::SIGNED_ASCII === self
end

#space?Boolean

Determines whether the String belongs to the white-space character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the white-space character set.

See Also:



169
170
171
# File 'lib/chars/extensions/string.rb', line 169

def space?
  Chars::SPACE === self
end

#symbolic?Boolean

Determines whether the String belongs to the symbolic character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the symbolic character set.

See Also:



156
157
158
# File 'lib/chars/extensions/string.rb', line 156

def symbolic?
  Chars::SYMBOLS === self
end

#uppercase_alpha?Boolean

Determines whether the String belongs to the upper-case alphabetic character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the upper-case alphabetic character set.

See Also:



87
88
89
# File 'lib/chars/extensions/string.rb', line 87

def uppercase_alpha?
  Chars::UPPERCASE_ALPHA === self
end

#uppercase_hex?Boolean

Determines whether the String belongs to the upper-case hexadecimal character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the upper-case hexadecimal character set.

See Also:



44
45
46
# File 'lib/chars/extensions/string.rb', line 44

def uppercase_hex?
  Chars::UPPERCASE_HEXADECIMAL === self
end

#visible?Boolean

Determines whether the String belongs to the visible character set.

Returns:

  • (Boolean)

    Specifies whether the String belongs to the visible character set.

See Also:



182
183
184
# File 'lib/chars/extensions/string.rb', line 182

def visible?
  Chars::VISIBLE === self
end