mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-11 16:24:11 +01:00
21 lines
574 B
Go
21 lines
574 B
Go
package clean
|
|
|
|
import "github.com/photoprism/photoprism/pkg/txt"
|
|
|
|
// Bool interprets s as a boolean using txt.Bool, which supports strconv.ParseBool
|
|
// tokens as well as localized yes/no mappings.
|
|
func Bool(s string) bool {
|
|
return txt.Bool(s)
|
|
}
|
|
|
|
// Yes reports whether s matches a supported affirmative token. It mirrors txt.Yes
|
|
// so callers can stay within the clean package when sanitizing inputs.
|
|
func Yes(s string) bool {
|
|
return txt.Yes(s)
|
|
}
|
|
|
|
// No reports whether s matches a supported negative token. It mirrors txt.No.
|
|
func No(s string) bool {
|
|
return txt.No(s)
|
|
}
|