cast icon indicating copy to clipboard operation
cast copied to clipboard

feat(StringSlice): support cast string to string slice by comma

Open zoumo opened this issue 6 years ago • 3 comments

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"}

zoumo avatar May 23 '18 09:05 zoumo

CLA assistant check
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.

CLAassistant avatar May 23 '18 09:05 CLAassistant

@bep

zoumo avatar Jul 16 '18 02:07 zoumo

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".

bep avatar Mar 18 '19 13:03 bep