mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 05:54:38 +03:00
update to latest adns, synced with Go's net
This commit is contained in:
22
vendor/github.com/mjl-/adns/parse.go
generated
vendored
22
vendor/github.com/mjl-/adns/parse.go
generated
vendored
@ -142,28 +142,6 @@ func dtoi(s string) (n int, i int, ok bool) {
|
||||
return n, i, true
|
||||
}
|
||||
|
||||
// Number of occurrences of b in s.
|
||||
func count(s string, b byte) int {
|
||||
n := 0
|
||||
for i := 0; i < len(s); i++ {
|
||||
if s[i] == b {
|
||||
n++
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
// Index of rightmost occurrence of b in s.
|
||||
func last(s string, b byte) int {
|
||||
i := len(s)
|
||||
for i--; i >= 0; i-- {
|
||||
if s[i] == b {
|
||||
break
|
||||
}
|
||||
}
|
||||
return i
|
||||
}
|
||||
|
||||
// hasUpperCase tells whether the given string contains at least one upper-case.
|
||||
func hasUpperCase(s string) bool {
|
||||
for i := range s {
|
||||
|
Reference in New Issue
Block a user