Skip to content

ocodo/words_to_numbers

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Words to Numbers

Simple words to numbers parser (BigInt supported only).

For example:

"Three hundred and twelve" = 312

Installation

Add this to your application's shard.yml:

dependencies:
  words_to_numbers:
    github: crystal-castles/words_to_numbers

Usage

words_to_numbers is an extension of String

require "words_to_numbers"

# Parse string of words to numbers
number = "Seventeen thousand".words_to_numbers
#=> 17000

Development

This library's specs are put in spec directory. They can run by crystal spec command.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Add test(s) in spec/ to cover your changes & write some code, until your test are passing.
  4. Commit your changes (git commit -am 'Describe your change')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request on github

License

MIT

(c) Jason Milkins - 2020 crystal-castles

Contributors

  • Jason Milkins

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Crystal 96.0%
  • Ruby 4.0%