win.hupubao.common.utils.ArrayUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hupubao-common Show documentation
Show all versions of hupubao-common Show documentation
简单封装公共工具,二维码工具,驼峰转换工具,des加解密工具,http访问工具,字符串工具,日期工具
package win.hupubao.common.utils;
import java.util.stream.Stream;
public class ArrayUtils {
/**
* 将英文逗号分隔的字符串转为Long类型数组;1,2,3,4=>[1,2,3,4]
* @param str
* @return
*/
public static long[] parseToLongArray(String str) {
if (StringUtils.isBlank(str)) {
return new long[0];
}
return Stream.of(str.split(",")).mapToLong(Long::valueOf).toArray();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy