How to check if a string starts with a specific substring (analog of StartsWith) in Go?
Hi everyone! I just started learning Go, switched from JavaScript, and encountered a small but annoying problem.\n\nIn JS I'm used to using the `str.startsWith("prefix")` method, which returns true or false. Very convenient for checking URL prefixes, file paths, or command prefixes.\n\nIn Go I expected to find something similar in the `strings` package, but to my surprise, I didn't find a `StartsWith` method. There is `HasPrefix`, `Contains`, `TrimPrefix`... but no direct analog that would immediately return a boolean value.\n\nHere's an example of the code I'm trying to write:\n\n```go\npackage main\n\nimport (\n "fmt"\n "strings"\n)\n\nfunc main() {\n url := "https://example.com/api/v1/users"\n \n // Here I don't know how to properly check\n // In JS it would be: url.startsWith("https://")\n```