commons-lang icon indicating copy to clipboard operation
commons-lang copied to clipboard

LANG-1481 Add StringUtils.split() methods with String[] input.

Open RatishBansal opened this issue 5 years ago • 3 comments

Leveraging the existing split(string,separator) method, to split each element of input array

RatishBansal avatar Apr 15 '20 17:04 RatishBansal

@RatishBansal I have just one small doubt, how do you plan to cover these cases mentioned here.

StringUtils.split(["a.b"],["c"], '.')     = ["a", "b", "c"]
StringUtils.split(["a"],["b"],["c"], '.') = ["a", "b", "c"]

amarlearning avatar Apr 15 '20 19:04 amarlearning

@RatishBansal I have just one small doubt, how do you plan to cover these cases mentioned here.

StringUtils.split(["a.b"],["c"], '.')     = ["a", "b", "c"]
StringUtils.split(["a"],["b"],["c"], '.') = ["a", "b", "c"]

@amarlearning as I mentioned in the comment as well, my understanding of the requirement is to write split method with String[] as input. I don't think the split method was meant to have varargs String[]. My understanding might be wrong, but I think the extra square brackets might be a mistake. I think @garydgregory would be the right person to clear the requirement.

RatishBansal avatar Apr 15 '20 21:04 RatishBansal

Coverage Status

Coverage decreased (-0.004%) to 95.09% when pulling 80ace1d8d6da93bc01a12edb7426bd7c0a0b8e64 on RatishBansal:master into cfe457636a53d3a1927f3c3f130074bfa0c9d492 on apache:master.

coveralls avatar Apr 15 '20 23:04 coveralls