Skip to content
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

One more problem with string splitting #110

Closed
dmlloyd opened this issue May 10, 2019 · 0 comments
Closed

One more problem with string splitting #110

dmlloyd opened this issue May 10, 2019 · 0 comments

Comments

@dmlloyd
Copy link
Contributor

dmlloyd commented May 10, 2019

David M. Lloyd @dmlloyd May 07 13:43
hey @jmesnil - regarding lists of strings (StringUtil.split) - given the sequence foo\\,bar, I believe the current code would yield a list with a single element foo\,bar. Is that the intention, or is it intended that that code yield a list of foo\ and bar?

Jeff Mesnil @jmesnil May 09 01:29
we have a test for this use case: https://github.com/smallrye/smallrye-config/blob/70abffdaadbdcf21ddf5c976157c517e29735f8d/implementation/src/test/java/io/smallrye/config/StringUtilTest.java#L29
large:cheese\\,mushroom,medium:chicken,small:pepperoni will yield a list of large:cheese,mushroom, medium:chicken, small:pepperoni

so foo\\,bar should return a single item containing foo,bar

oh, by sequence foo\\,bar do you mean the String "foo\\\\,bar"?

if that's the case, the backslashes have no meaning and I'd expect that the returned value is a list of foo\\ & bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant