You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In TrimRight, the second parameter is a cutset: TrimRight(s string, cutset string), i.e. a set of individual characters to be trimmed.
Passing "@xx.com" doesn't mean "trim right at @xx.com", it means "trim all @ x, c, o, and m characters from the right". That's why your c gets trimmed, too.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/N87az0K_2by
What did you expect to see?
abc
What did you see instead?
ab
The text was updated successfully, but these errors were encountered: