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

feat: add IsChineseHMPassport

This commit is contained in:
dudaodong
2025-08-21 14:13:43 +08:00
parent 9f0ad2354a
commit 7d4b9510a2
5 changed files with 209 additions and 83 deletions

View File

@@ -701,3 +701,24 @@ func ExampleIsPassport() {
// true
// false
}
func ExampleIsChineseHMPassport() {
result1 := IsChineseHMPassport("C12345678")
result2 := IsChineseHMPassport("C00000000")
result3 := IsChineseHMPassport("M12345678")
result4 := IsChineseHMPassport("c12345678")
result5 := IsChineseHMPassport("C1234567")
fmt.Println(result1)
fmt.Println(result2)
fmt.Println(result3)
fmt.Println(result4)
fmt.Println(result5)
// Output:
// true
// true
// true
// false
// false
}