-
-
Save kayabe/02be3a8405bc5663d073a8732fbdc183 to your computer and use it in GitHub Desktop.
Go: check if a string ends 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.HasSuffix("foobar", "bar") // true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment