hugo/docs/content/en/functions/strings/TrimPrefix.md
2023-12-04 15:24:01 +01:00

632 B

title description categories keywords action aliases
strings.TrimPrefix Returns the given string, removing the prefix from the beginning of the string.
aliases related returnType signatures
functions/strings/Chomp
functions/strings/Trim
functions/strings/TrimLeft
functions/strings/TrimRight
functions/strings/TrimSuffix
string
strings.TrimPrefix PREFIX STRING
/functions/strings.trimprefix
{{ strings.TrimPrefix "a" "aabbaa" }} → abbaa
{{ strings.TrimPrefix "aa" "aabbaa" }} → bbaa
{{ strings.TrimPrefix "aaa" "aabbaa" }} → aabbaa