strings.TrimSpace

strings.TrimSpace(s string) removes whitespace from the beginning and end of the string:

https://codeeval.dev/gist/a3939c426807f7c7201298665365ed20

strings.TrimPrefix, strings.TrimSuffix

strings.TrimPrefix and strings.TrimSuffix remove a given string from the beginning or end of string:

https://codeeval.dev/gist/f1aaf06fffed86d547e9dbff08510765

strings.Trim

strings.Trim removes all characters from a given cut set from a string:

https://codeeval.dev/gist/ae18fe51489f4e3124261879dac5ab6e

strings.Replace

To remove substrings you can replace with empty string:

https://codeeval.dev/gist/2486d03454c9b07e695398c6a6326168