class OoxmlParser::StringHelper

Class for working with strings

Public Class Methods

complex?(string) click to toggle source

Check if string is complex number @return [True, False] result of comparison

# File lib/ooxml_parser/helpers/string_helper.rb, line 17
def complex?(string)
  true if Complex(string.tr(',', '.'))
rescue ArgumentError
  false
end
numeric?(string) click to toggle source

This method check if string contains numeric @return [True, False] result of comparison

# File lib/ooxml_parser/helpers/string_helper.rb, line 9
def numeric?(string)
  true if Float(string)
rescue ArgumentError
  false
end