feature(strings): add Func

This commit is contained in:
pyihe
2022-08-05 16:20:14 +08:00
parent 70decf78e6
commit 2b15311f1e
2 changed files with 60 additions and 48 deletions

View File

@@ -0,0 +1,21 @@
package strings
func isUpper(s string) bool {
for i := range s {
c := s[i]
if c >= 'a' && c <= 'z' {
return false
}
}
return true
}
func isLower(s string) bool {
for i := range s {
c := s[i]
if c >= 'A' && c <= 'Z' {
return false
}
}
return true
}