Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martinlindhe/base36
Base36 implementation in golang
https://github.com/martinlindhe/base36
base36 golang-library
Last synced: 3 days ago
JSON representation
Base36 implementation in golang
- Host: GitHub
- URL: https://github.com/martinlindhe/base36
- Owner: martinlindhe
- License: mit
- Created: 2016-03-12T16:45:19.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-01-11T23:07:15.000Z (12 months ago)
- Last Synced: 2024-12-23T19:13:33.157Z (10 days ago)
- Topics: base36, golang-library
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 62
- Watchers: 4
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# About
[![GoDoc](https://godoc.org/github.com/martinlindhe/base36?status.svg)](https://godoc.org/github.com/martinlindhe/base36)
Implements Base36 encoding and decoding, which is useful to represent
large integers in a case-insensitive alphanumeric way.## Examples
```go
import "github.com/martinlindhe/base36"fmt.Println(base36.Encode(5481594952936519619))
// Output: 15N9Z8L3AU4EBfmt.Println(base36.Decode("15N9Z8L3AU4EB"))
// Output: 5481594952936519619fmt.Println(base36.EncodeBytes([]byte{1, 2, 3, 4}))
// Output: A2F44fmt.Println(base36.DecodeToBytes("A2F44"))
// Output: [1 2 3 4]
```## Notice
For basic base 36 conversion, you can use [strconv.FormatUint()](https://pkg.go.dev/strconv#FormatUint) from the stdlib.
## License
Under [MIT](LICENSE)