chore: fix various problems (#39298)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
wxiaoguang
2026-09-14 22:15:21 +02:00
committed by GitHub
co-authored by Lunny Xiao
parent 85cbf477e5
commit c0ceea2f8f
14 changed files with 124 additions and 122 deletions
+8
View File
@@ -4,6 +4,7 @@
package util
import (
"iter"
"strings"
"unsafe"
)
@@ -131,3 +132,10 @@ func AsciiEqualFold(s, t string) bool {
}
return true
}
func StringSplitSeq[T, S ~string](s T, sep S) iter.Seq[T] {
f := strings.SplitSeq(string(s), string(sep))
return func(yield func(T) bool) {
f(func(v string) bool { return yield(T(v)) })
}
}