1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-10 15:52:27 +08:00

doc: update doc for v2.3.6

This commit is contained in:
dudaodong
2025-05-28 11:30:12 +08:00
parent 622aacaf44
commit 1b73483945
9 changed files with 316 additions and 140 deletions

View File

@@ -182,7 +182,7 @@ func IsJSON(str string) bool {
return json.Unmarshal([]byte(str), &js) == nil
}
// IsAlphaNumericStr check if the string is alphanumeric.
// IsAlphaNumeric check if the string is alphanumeric.
// Play: todo
func IsAlphaNumeric(s string) bool {
return alphaNumericMatcher.MatchString(s)

View File

@@ -665,3 +665,21 @@ func ExampleIsChinaUnionPay() {
// true
// false
}
func ExampleIsAlphaNumeric() {
result1 := IsAlphaNumeric("ABC")
result2 := IsAlphaNumeric("123")
result3 := IsAlphaNumeric("abc123")
result4 := IsAlphaNumeric("abc123@#$")
fmt.Println(result1)
fmt.Println(result2)
fmt.Println(result3)
fmt.Println(result4)
// Output:
// true
// true
// true
// false
}