init commit

This commit is contained in:
2026-03-31 14:40:03 +03:00
commit 41c8e186ef
37 changed files with 5420 additions and 0 deletions

31
core/util.go Normal file
View File

@@ -0,0 +1,31 @@
package core
import (
"net/url"
"strconv"
"strings"
)
func itoa(n int) string {
return strconv.Itoa(n)
}
func hasPrefix(s, prefix string) bool {
return strings.HasPrefix(strings.ToLower(s), strings.ToLower(prefix))
}
func lastIndexOf(s string, ch byte) int {
return strings.LastIndexByte(s, ch)
}
func splitAt(s string, ch byte) []string {
idx := strings.IndexByte(s, ch)
if idx < 0 {
return []string{s}
}
return []string{s[:idx], s[idx+1:]}
}
func urlUnescape(s string) (string, error) {
return url.PathUnescape(s)
}