Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
Decode decodes a base36-encoded string.
Example ¶
package main import ( "fmt" "github.com/martinlindhe/base36" ) func main() { fmt.Println(base36.Decode("15N9Z8L3AU4EB")) }
Output: 5481594952936519619
func DecodeToBytes ¶
DecodeToBytes decodes a base36 string to a byte slice, using alphabet.
Example ¶
package main import ( "fmt" "github.com/martinlindhe/base36" ) func main() { fmt.Println(base36.DecodeToBytes("A2F44")) }
Output: [1 2 3 4]
func Encode ¶
Encode encodes a number to base36.
Example ¶
package main import ( "fmt" "github.com/martinlindhe/base36" ) func main() { fmt.Println(base36.Encode(5481594952936519619)) }
Output: 15N9Z8L3AU4EB
func EncodeBytes ¶
EncodeBytes encodes a byte slice to base36 string.
Example ¶
package main import ( "fmt" "github.com/martinlindhe/base36" ) func main() { fmt.Println(base36.EncodeBytes([]byte{1, 2, 3, 4})) }
Output: A2F44
func EncodeBytesAsBytes ¶
EncodeBytesAsBytes encodes a byte slice to base36.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.