Last active
October 21, 2025 08:55
-
-
Save flaviocopes/6f9e4c82c27cf0738047c857e1c8b2c8 to your computer and use it in GitHub Desktop.
Go: check if a string ends 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.HasSuffix("foobar", "bar") // true | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment