mirror of
https://gitee.com/dromara/hutool.git
synced 2025-07-16 16:50:45 +08:00
add methods
This commit is contained in:
parent
e3810b3727
commit
b0b46f75b2
@ -3,9 +3,10 @@
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# 5.6.7 (2021-05-28)
|
# 5.6.7 (2021-05-29)
|
||||||
|
|
||||||
### 🐣新特性
|
### 🐣新特性
|
||||||
|
* 【core 】 CharSequenceUtil增加join重载(issue#I3TFJ5@Gitee)
|
||||||
|
|
||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
* 【core 】 修复FileUtil.normalize去掉末尾空格问题(issue#1603@Github)
|
* 【core 】 修复FileUtil.normalize去掉末尾空格问题(issue#1603@Github)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cn.hutool.core.text;
|
package cn.hutool.core.text;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.comparator.VersionComparator;
|
import cn.hutool.core.comparator.VersionComparator;
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
@ -4233,6 +4234,19 @@ public class CharSequenceUtil {
|
|||||||
return ArrayUtil.join(objs, conjunction);
|
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);
|
Console.log(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Ignore
|
||||||
|
public void execCmdTest2() {
|
||||||
|
String str = RuntimeUtil.execForStr("cmd /c cd C:\\Program Files (x86)");
|
||||||
|
Console.log(str);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getUsableMemoryTest(){
|
public void getUsableMemoryTest(){
|
||||||
Assert.assertTrue(RuntimeUtil.getUsableMemory() > 0);
|
Assert.assertTrue(RuntimeUtil.getUsableMemory() > 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user