GithubHelp home page GithubHelp logo

int2turkish's Introduction

int2turkish

Convert numbers to Turkish text.

Signature

func Text(num int64) []string

Usage

    import "github.com/disq/int2turkish"

Then:

    int2turkish.Text("42") // []string{ "Kırk", "İki" }

    strings.Join(int2turkish.Text("42"), "") // Kırkİki
    strings.Join(int2turkish.Text("42"), " ") // Kırk İki

Example Results

go test -v .
=== RUN   TestTurkish
--- PASS: TestTurkish (0.00s)
    int2turkish_test.go:65: Case #0: Input: 0 = "Sıfır"
    int2turkish_test.go:65: Case #1: Input: 1 = "Bir"
    int2turkish_test.go:65: Case #2: Input: 42 = "Kırkİki"
    int2turkish_test.go:65: Case #3: Input: 110 = "YüzOn"
    int2turkish_test.go:65: Case #4: Input: 1981 = "BinDokuzYüzSeksenBir"
    int2turkish_test.go:65: Case #5: Input: 5150 = "BeşBinYüzElli"
    int2turkish_test.go:65: Case #6: Input: 31337 = "OtuzBirBinÜçYüzOtuzYedi"
    int2turkish_test.go:65: Case #7: Input: 100300 = "YüzBinÜçYüz"
    int2turkish_test.go:65: Case #8: Input: 1000042 = "BirMilyonKırkİki"
    int2turkish_test.go:65: Case #9: Input: 110000042 = "YüzOnMilyonKırkİki"
    int2turkish_test.go:65: Case #10: Input: 1001000100011 = "BirTrilyonBirMilyarYüzBinOnBir"
PASS
ok      github.com/disq/int2turkish     0.007s

int2turkish's People

Contributors

disq avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.