New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search for substr from position #42924
Comments
The string can be treated as a slice package main
import "strings"
func main() {
s := "This is a string"
n := strings.Index(s[5:], "is")
} |
Thanks |
|
yes. I forgot to mention that the slice is sort of a new string so indexing begins at 0 again |
Thank you for raising this issue. Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only. For asking questions, see:
|
Can I search for a substr starting from a specific position:
like this function in C++:
The text was updated successfully, but these errors were encountered: