Forked from flaviocopes/check-substring-starts-with.go
Created
September 4, 2019 15:00
-
-
Save lbvf50mobile/65298c689e2f2b850aa6ad8bd7b61717 to your computer and use it in GitHub Desktop.
Go: check if a string starts with a substring #golang
This file contains hidden or 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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment