Categorygithub.com/sujamess/numconword
modulepackage
0.0.5
Repository: https://github.com/sujamess/numconword.git
Documentation: pkg.go.dev

# README

numconword Coverage Status Go Report Card Go Reference

What is numconword?

numconword is a Go library for converting any type of numbers into readable words

  • numconword prioritizes big number handling — You could convert numbers as big as you want

Quick start

  1. Installation
go get -u github.com/sujamess/numconword
  1. Let's convert!
package main

import (
    "fmt"
    
    "github.com/sujamess/numconword"
)

func main() {
    readableWords, err := numconword.ConvertFloat64(123456.78)
    if err != nil {
        // handle error
    }
    
    // one hundred twenty three thousand fifty six point seventy eight
    fmt.Println(readableWords)
}

Contribution

I'll really appreciate contributions! This library has a lot of things to work on (translation, performance improvement, add more test cases, etc.)

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

ConvertFloat32 executes a cv command and return readable words The opts parameter can be used to specify options for this converting (see the options.ConvertOptions documentation).
ConvertFloat64 executes a cv command and return readable words The opts parameter can be used to specify options for this converting (see the options.ConvertOptions documentation).
ConvertInt executes a cv command and return readable words The opts parameter can be used to specify options for this converting (see the options.ConvertOptions documentation).
ConvertInt32 executes a cv command and return readable words The opts parameter can be used to specify options for this converting (see the options.ConvertOptions documentation).
ConvertInt64 executes a cv command and return readable words The opts parameter can be used to specify options for this converting (see the options.ConvertOptions documentation).
ConvertString executes a cv command and return readable words The opts parameter can be used to specify options for this converting (see the options.ConvertOptions documentation).

# Variables

ErrInvalidNumber is an error when input an invalid number.