Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
Equim-chan committed Dec 8, 2017
1 parent 5ad0f73 commit 424e8ce
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions example_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package base256_test

import (
"fmt"

"ekyu.moe/base256"
)

func Example() {
fmt.Println(base256.EncodeToString([]byte("Hello, 世界")))
fmt.Println(string(base256.DecodeString("👾🍧🙆🍬🙇🌱😌🚟💦🏥🐴🏤👈")))
// Output:
// 👾🍧🙆🍬🙇🌱😌🚟💦🏥🐴🏤👈
// Hello, 世界
}

0 comments on commit 424e8ce

Please # to comment.