• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.travis.ymlH A D18-Apr-2019109

LICENSEH A D18-Apr-20191.1 KiB

MakefileH A D18-Apr-201954

README.mdH A D18-Apr-2019749

base36.goH A D18-Apr-20192.7 KiB

base36_test.goH A D18-Apr-20191.1 KiB

example_test.goH A D18-Apr-2019479

README.md

1# About
2
3[![Travis-CI](https://api.travis-ci.org/martinlindhe/base36.svg)](https://travis-ci.org/martinlindhe/base36)
4[![GoDoc](https://godoc.org/github.com/martinlindhe/base36?status.svg)](https://godoc.org/github.com/martinlindhe/base36)
5
6Implements Base36 encoding and decoding, which is useful to represent
7large integers in a case-insensitive alphanumeric way.
8
9## Examples
10
11```go
12import "github.com/martinlindhe/base36"
13
14fmt.Println(base36.Encode(5481594952936519619))
15// Output: 15N9Z8L3AU4EB
16
17fmt.Println(base36.Decode("15N9Z8L3AU4EB"))
18// Output: 5481594952936519619
19
20fmt.Println(base36.EncodeBytes([]byte{1, 2, 3, 4}))
21// Output: A2F44
22
23fmt.Println(base36.DecodeToBytes("A2F44"))
24// Output: [1 2 3 4]
25```
26
27## License
28
29Under [MIT](LICENSE)
30