mhib / number_parser

Numerizer in crystal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

number_parser

Numerizer in crystal

It passes 100% numerizer tests.

Installation

Add this to your application's shard.yml:

dependencies:
  number_parser:
    github: mhib/number_parser

Usage

require "number_parser"

>> NumberParser.parse('forty two')
=> "42"
>> NumberParser.parse('two and a half')
=> "2.5"
>> NumberParser.parse('three quarters')
=> "3/4"
>> NumberParser.parse('two and three eighths')
=> "2.375"

Contributing

  1. Fork it (https://github.com/mhib/number_parser/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • mhib Marcin Henryk Bartkowiak - creator, maintainer

About

Numerizer in crystal

License:MIT License


Languages

Language:Crystal 100.0%