mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add StrJoiner
This commit is contained in:
@@ -37,6 +37,13 @@ public class IterUtilTest {
|
||||
Assert.assertEquals("\"1\":\"2\":\"3\":\"4\"", join2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void joinWithFuncTest() {
|
||||
ArrayList<String> list = CollUtil.newArrayList("1", "2", "3", "4");
|
||||
String join = IterUtil.join(list.iterator(), ":", String::valueOf);
|
||||
Assert.assertEquals("1:2:3:4", join);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testToListMap() {
|
||||
Map<String, List<String>> expectedMap = new HashMap<>();
|
||||
|
Reference in New Issue
Block a user