package hstrings
import "github.com/gohugoio/hugo/common/hstrings"
Index ¶
- func EqualAny(a string, b ...string) bool
- func GetOrCompileRegexp(pattern string) (re *regexp.Regexp, err error)
- type StringEqualFold
Functions ¶
func EqualAny ¶
EqualAny returns whether a string is equal to any of the given strings.
func GetOrCompileRegexp ¶
GetOrCompileRegexp retrieves a regexp object from the cache based upon the pattern. If the pattern is not found in the cache, the pattern is compiled and added to the cache.
Types ¶
type StringEqualFold ¶
type StringEqualFold string
StringEqualFold is a string that implements the compare.Eqer interface and considers two strings equal if they are equal when folded to lower case. The compare.Eqer interface is used in Hugo to compare values in templates (e.g. using the eq template function).
func (StringEqualFold) Eq ¶
func (s StringEqualFold) Eq(s2 any) bool
func (StringEqualFold) EqualFold ¶
func (s StringEqualFold) EqualFold(s2 string) bool
func (StringEqualFold) String ¶
func (s StringEqualFold) String() string
Source Files ¶
- Version
- v0.116.1
- Published
- Aug 1, 2023
- Platform
- js/wasm
- Imports
- 5 packages
- Last checked
- 3 hours ago –
Tools for package owners.