wordstonumbers 0.1.1 copy "wordstonumbers: ^0.1.1" to clipboard
wordstonumbers: ^0.1.1 copied to clipboard

A Dart package that can be used to convert words to numbers

Wordstonumbers.dart #

Wordstonumbers.dart is a simple dart package that converts a string of simple worded numbers into digits (e.g one hundred -> 100).

Usage #

wordsToNumbers('one hundred twenty') // -> 120
'one hundred twenty'.w2n() //-> 120

num number = wordsToNumbers('one hundred and three')
print(number) // -> 103

wordsToNumbers('one million eight hundred thousand and forty') // -> 1800040 

'one million'.w2n() // -> 1000000

If you would like to add to this package feel free to open a PR with your additions. I'm always looking for a way to better my packages. I hope this helps out a few of you.

3
likes
110
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

A Dart package that can be used to convert words to numbers

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on wordstonumbers