blob: 9609e61971efb9bf65ba39fc943f4f745f9660f0 (
plain) (
tree)
|
|
// SPDX-License-Identifier: AGPL-3.0-only
// SPDX-FileContributor: Runxi Yu <https://runxiyu.org>
package main
import (
"net/url"
"path"
"strings"
)
func firstLine(s string) string {
before, _, _ := strings.Cut(s, "\n")
return before
}
func baseName(s string) string {
return path.Base(s)
}
func pathEscape(s string) string {
return url.PathEscape(s)
}
func queryEscape(s string) string {
return url.QueryEscape(s)
}
|