strings.TrimSpace(s string) removes whitespace from the beginning and end of the string:
https://codeeval.dev/gist/a3939c426807f7c7201298665365ed20
strings.TrimPrefix and strings.TrimSuffix remove a given string from the beginning or end of string:
https://codeeval.dev/gist/f1aaf06fffed86d547e9dbff08510765
strings.Trim removes all characters from a given cut set from a string:
https://codeeval.dev/gist/ae18fe51489f4e3124261879dac5ab6e
To remove substrings you can replace with empty string: