Skip to content

This is a dart package that converts words to numbers. It can be used in Flutter and normal Dart programs

License

Notifications You must be signed in to change notification settings

michaelessiet/wordstonumbers.dart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

This is a dart package that converts words to numbers. It can be used in Flutter and normal Dart programs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages