We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
if param s is an empty string, the result of strings.Split() should be an empty slice. But not now.
s
eg:
len(strings.Split("", ",")) // result: 1
The text was updated successfully, but these errors were encountered:
Working as intended, and clearly documented:
If s does not contain sep and sep is not empty, Split returns a slice of length 1 whose only element is s.
Whether s itself is empty or not plays no role. This makes for a more robust API.
Sorry, something went wrong.
No branches or pull requests
if param
s
is an empty string, the result of strings.Split() should be an empty slice. But not now.eg:
The text was updated successfully, but these errors were encountered: