添加部分测试

This commit is contained in:
Yun
2024-01-11 21:48:44 +08:00
parent 97f9a0cb86
commit 832e70ba48
2 changed files with 20 additions and 2 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ import (
const base64 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/"
// DecToBase64 将10进制的数字转换为64进制的字符串
func DecToBase64(n int) string {
func Encode10To64(n int) string {
if n == 0 {
return "0"
}
@@ -30,7 +30,7 @@ func DecToBase64(n int) string {
}
// Base64ToDec 将64进制的字符串转换为10进制的数字
func Base64ToDec(s string) int {
func Decode64To10(s string) int {
n := 0
// 遍历字符串的每个字符
for _, c := range s {