Skip to content

Commit 424e8ce

Browse files
committed
add example
1 parent 5ad0f73 commit 424e8ce

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

example_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package base256_test
2+
3+
import (
4+
"fmt"
5+
6+
"ekyu.moe/base256"
7+
)
8+
9+
func Example() {
10+
fmt.Println(base256.EncodeToString([]byte("Hello, 世界")))
11+
fmt.Println(string(base256.DecodeString("👾🍧🙆🍬🙇🌱😌🚟💦🏥🐴🏤👈")))
12+
// Output:
13+
// 👾🍧🙆🍬🙇🌱😌🚟💦🏥🐴🏤👈
14+
// Hello, 世界
15+
}

0 commit comments

Comments
 (0)