support importing transaction data from alipay export file

This commit is contained in:
MaysWind
2024-09-22 19:27:20 +08:00
parent 732fa3b9de
commit 52b37c2a13
19 changed files with 826 additions and 79 deletions
+15
View File
@@ -76,6 +76,21 @@ func GetFirstLowerCharString(s string) string {
return string(chars)
}
// ContainsOnlyOneRune returns the source string only contains one character
func ContainsOnlyOneRune(s string, r rune) bool {
if len(s) < 1 {
return false
}
for i := 0; i < len(s); i++ {
if rune(s[i]) != r {
return false
}
}
return true
}
// GetRandomString returns a random string of which length is n
func GetRandomString(n int) (string, error) {
var result = make([]byte, n)