mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add methods
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package cn.hutool.core.text;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.comparator.VersionComparator;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
@@ -4233,6 +4234,19 @@ public class CharSequenceUtil {
|
||||
return ArrayUtil.join(objs, conjunction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 以 conjunction 为分隔符将多个对象转换为字符串
|
||||
*
|
||||
* @param conjunction 分隔符
|
||||
* @param iterable 集合
|
||||
* @return 连接后的字符串
|
||||
* @see CollUtil#join(Iterable, CharSequence)
|
||||
* @since 5.6.6
|
||||
*/
|
||||
public static <T> String join(CharSequence conjunction, Iterable<T> iterable) {
|
||||
return CollUtil.join(iterable, conjunction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 字符串的每一个字符是否都与定义的匹配器匹配
|
||||
*
|
||||
|
@@ -26,6 +26,13 @@ public class RuntimeUtilTest {
|
||||
Console.log(str);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void execCmdTest2() {
|
||||
String str = RuntimeUtil.execForStr("cmd /c cd C:\\Program Files (x86)");
|
||||
Console.log(str);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getUsableMemoryTest(){
|
||||
Assert.assertTrue(RuntimeUtil.getUsableMemory() > 0);
|
||||
|
Reference in New Issue
Block a user