-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
Description
What version of Go are you using (go version)?
$ go version go version go1.20.7 darwin/amd64
Does this issue reproduce with the latest release?
Yes
https://go.dev/play/p/Abefs5j3At0
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
What did you do?
func main() {
fmt.Println(strings.TrimLeft("user_support", "user_"))
// Expected: support Actual: pport
fmt.Println(strings.TrimLeft("user_conversation", "user_"))
// Expected: conversation Actual: conversation
fmt.Println(strings.TrimLeft("user_suconversation", "user_"))
// Expected: suconversation Actual: conversation
}
https://go.dev/play/p/Abefs5j3At0
What did you expect to see?
TrimLeft output not expected in above cases. Output seems bit different when string contains su substring.
What did you see instead?
Please see above snippet.
Reactions are currently unavailable