hugo/docs/content/en/functions/strings/TrimPrefix.md
2024-11-13 11:07:57 +01:00

666 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/TrimSpace
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