cast
cast copied to clipboard
feat(StringSlice): support cast string to string slice by comma
support cast string to string slice by comma
a b -> []string{"a", "b"}
a,b -> []string{"a", "b"}
a b,c -> []string{"a", "b,c"}
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
Jun Zhang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.
@bep
I wish we could add this, but the introduction of comma, while it feels natural, would be breaking.
{"a,b", []string{"a", "b"}, false},
Someone may depend the above test case returning "a,b"
.