Last active
June 23, 2024 09:05
-
-
Save flaviocopes/6717857ca7ba7266d41330329eeb5ad0 to your computer and use it in GitHub Desktop.
Go: check if a string starts with a substring #golang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"strings" | |
) | |
func main() { | |
strings.HasPrefix("foobar", "foo") // true | |
} |
thank
Merci!
Gracias!
Still going strong in 2022!
Danke
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!