Method: String#is_float?

Defined in:
lib/openc3/core_ext/string.rb

#is_float?Boolean

Returns Whether the String represents a floating point number.

Returns:

  • (Boolean)

    Whether the String represents a floating point number



193
194
195
# File 'lib/openc3/core_ext/string.rb', line 193

def is_float?
  if self =~ FLOAT_CHECK_REGEX or self =~ SCIENTIFIC_CHECK_REGEX then true else false end
end