Skip to content

sergeidovydenko/num2word

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

num2word Convert numbers to words in Russian language

num2word - Numbers to words converter in Go (Golang)

Usage

First, import package num2word

import github.com/sergeidovydenko/num2word

Convert number(int) to text

  male inclination
  str := num2word.Convert(115, false) // outputs "сто пятнадцать"
  ...
  str := num2word.Convert(2012, false) // outputs "две тысячи двенадцать"
  ...
  str := num2word.Convert(-1, false) // outputs "минус один"
  ...
  female inclination
  str := num2word.Convert(-1, true) // outputs "минус одна"

Convert number(float) to currency

  str := num2word.ConvertToCurrency(514, "RUB") // outputs "один рубль одна копейка"
  ...
  str := num2word.ConvertToCurrency(123, "EUR") // outputs "один евро ноль центов"

About

Convert numbers to words in Russian language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages