I want to remove the very last character of a string, but before I do so I want to check if the last character is a \"+\". How can this be done?
No builtin way. But it's trivial to do manually.
s := "mystring+" sz := len(s) if sz > 0 && s[sz-1] == '+' { s = s[:sz-1] }