Method: Rsmart::ETL.parse_integer
- Defined in:
- lib/rsmart_toolbox/etl.rb
.parse_integer(str, opt = {}) ⇒ Integer?
Note:
Note the behavioral difference versus #to_i.
Parse an Integer from a String.
223 224 225 226 227 228 229 230 |
# File 'lib/rsmart_toolbox/etl.rb', line 223 def self.parse_integer(str, opt={}) s = parse_string str, opt if s.empty? return nil; else return s.to_i end end |