Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/disq/int2turkish
https://github.com/disq/int2turkish
fatura turkish
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/disq/int2turkish
- Owner: disq
- License: mit
- Created: 2019-01-23T22:13:46.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-24T07:08:10.000Z (almost 6 years ago)
- Last Synced: 2024-10-12T13:13:32.221Z (2 months ago)
- Topics: fatura, turkish
- Language: Go
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# int2turkish
Convert numbers to Turkish text.
## Signature
func Text(num int64) []string
## Usage
```go
import "github.com/disq/int2turkish"
```Then:
```go
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