public class StringUtil
extends org.apache.commons.lang.StringUtils
| 限定符和类型 | 字段和说明 |
|---|---|
static org.beetl.ext.fn.EmptyExpressionFunction |
isEmpty |
static String |
KEY_CHILDREN
子节点KEY
|
| 构造器和说明 |
|---|
StringUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
addInput(String zddm,
Object value)
beetl-支持通配符的判断
|
static com.alibaba.fastjson.JSONArray |
buildTree(List<com.alibaba.fastjson.JSONObject> list,
String upkey,
String key)
构建的树数据,要求根节点为空,默认根据为:_root
|
static com.alibaba.fastjson.JSONArray |
buildTree(List<com.alibaba.fastjson.JSONObject> list,
String upkey,
String key,
String rootKey)
构建的树数据,要求根节点为空
|
static String |
bytesToHexString(byte[] byteArray)
Convert byte[] to hex
string.这里我们可以将byte转换成int,然后利用Integer.toHexString(int)来转换成16进制字符串。
|
static void |
clEqDate(SysSjglSjzd field,
com.alibaba.fastjson.JSONObject yobj)
beetl-时间范围查询
|
static String |
decodeing(String data,
Jmfs jmsf,
String mm1,
String mm2)
解密
|
static String |
desDeByField(String data,
SysSjglSjzd field)
基于字段配置用des算法对字段进行解密密
|
static String |
desEnByField(String data,
SysSjglSjzd field)
基于字段配置用des算法对字段进行加密
|
static String |
encodeing(String data,
Jmfs jmsf,
String mm1,
String mm2)
加密
|
static <T> T |
fastNotNull(T... ts)
获取第一个不为空的值
|
static String |
generateKeyPair(String val,
String jmsf)
生成秘钥
|
static String |
getFullSpell(Reader source) |
static String |
getFullSpell(String source)
获取字符串全拼
|
static String |
getSimpleSpell(Reader source) |
static String |
getSimpleSpell(String source)
获取字符串简拼
|
static String |
getUUIDUpperStr() |
static byte[] |
hexStringToBytes(String hexString)
Convert hex string to byte[]
|
static String |
humpToUnderline(String str) |
static boolean |
isBlank(Object obj)
判断对象是否为空或空字符串
|
static boolean |
isNotBlank(Object obj) |
static String |
lowerCaseFast(String name)
将字符串首字母转换为小写
|
static <T> T |
requireNonNull(T obj,
String msg) |
static String |
strJoin(List<String> list,
String separator)
字符串拼接
|
static String |
substrByByte(Object obj,
int maxLength)
按字节计算长度进行截取
|
static String |
toUtf8(String s)
转为utf8
|
static String |
underlineTohump(String str)
下划线规则的命名转换为驼峰式命名
|
static String |
upperCaseFast(String name)
将字符串首字母转换为大写
|
static <T> T |
valByDef(T val,
T def)
当传入的值为空时,采用默认值
|
static Boolean |
validateNumber(String str)
校验字符串是否纯数字,无长度限制
|
static int |
whether(Object obj) |
abbreviate, abbreviate, abbreviateMiddle, capitalise, capitaliseAllWords, capitalize, center, center, center, chomp, chomp, chompLast, chompLast, chop, chopNewline, clean, concatenate, contains, contains, containsAny, containsAny, containsIgnoreCase, containsNone, containsNone, containsOnly, containsOnly, countMatches, defaultIfEmpty, defaultString, defaultString, deleteSpaces, deleteWhitespace, difference, endsWith, endsWithIgnoreCase, equals, equalsIgnoreCase, escape, getChomp, getCommonPrefix, getLevenshteinDistance, getNestedString, getNestedString, getPrechomp, indexOf, indexOf, indexOf, indexOf, indexOfAny, indexOfAny, indexOfAny, indexOfAnyBut, indexOfAnyBut, indexOfDifference, indexOfDifference, indexOfIgnoreCase, indexOfIgnoreCase, isAllLowerCase, isAllUpperCase, isAlpha, isAlphanumeric, isAlphanumericSpace, isAlphaSpace, isAsciiPrintable, isBlank, isEmpty, isNotBlank, isNotEmpty, isNumeric, isNumericSpace, isWhitespace, join, join, join, join, join, join, join, join, join, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOfAny, lastIndexOfIgnoreCase, lastIndexOfIgnoreCase, lastOrdinalIndexOf, left, leftPad, leftPad, leftPad, length, lowerCase, lowerCase, mid, ordinalIndexOf, overlay, overlayString, prechomp, remove, remove, removeEnd, removeEndIgnoreCase, removeStart, removeStartIgnoreCase, repeat, repeat, replace, replace, replaceChars, replaceChars, replaceEach, replaceEachRepeatedly, replaceOnce, reverse, reverseDelimited, reverseDelimitedString, right, rightPad, rightPad, rightPad, split, split, split, split, splitByCharacterType, splitByCharacterTypeCamelCase, splitByWholeSeparator, splitByWholeSeparator, splitByWholeSeparatorPreserveAllTokens, splitByWholeSeparatorPreserveAllTokens, splitPreserveAllTokens, splitPreserveAllTokens, splitPreserveAllTokens, splitPreserveAllTokens, startsWith, startsWithAny, startsWithIgnoreCase, strip, strip, stripAll, stripAll, stripEnd, stripStart, stripToEmpty, stripToNull, substring, substring, substringAfter, substringAfterLast, substringBefore, substringBeforeLast, substringBetween, substringBetween, substringsBetween, swapCase, trim, trimToEmpty, trimToNull, uncapitalise, uncapitalize, upperCase, upperCasepublic static String getUUIDUpperStr()
public static boolean isBlank(Object obj)
obj - 对象public static <T> T requireNonNull(T obj,
String msg)
public static boolean isNotBlank(Object obj)
public static <T> T valByDef(T val,
T def)
val - 传入值def - 默认值@SafeVarargs public static <T> T fastNotNull(T... ts)
T - 泛型ts - 值列表public static String strJoin(List<String> list, String separator)
list - 字符串列表separator - 分隔符public static Boolean validateNumber(String str)
str - 待验证字符串public static String underlineTohump(String str)
str - 原名称public static String addInput(String zddm, Object value)
zddm - 字段名称value - 值public static void clEqDate(SysSjglSjzd field, com.alibaba.fastjson.JSONObject yobj)
field - 字段对象yobj - 前端传入表单public static String desEnByField(String data, SysSjglSjzd field)
data - 待加密的数据field - 字段信息public static String encodeing(String data, Jmfs jmsf, String mm1, String mm2)
data - 待加密数据jmsf - 加密方式mm1 - 一级密码mm2 - 二级密码public static String generateKeyPair(String val, String jmsf)
val - 待处理数据jmsf - 加密方式public static String desDeByField(String data, SysSjglSjzd field)
data - 待解密数据field - 字段信息public static String decodeing(String data, Jmfs jmsf, String mm1, String mm2)
data - 待解密数据jmsf - 解密方式mm1 - 一级密码mm2 - 二级密码public static String getSimpleSpell(Reader source) throws com.github.stuxuhai.jpinyin.PinyinException
com.github.stuxuhai.jpinyin.PinyinExceptionpublic static String getSimpleSpell(String source) throws com.github.stuxuhai.jpinyin.PinyinException
source - 来源字符串com.github.stuxuhai.jpinyin.PinyinException - 拼音异常public static String getFullSpell(Reader source) throws com.github.stuxuhai.jpinyin.PinyinException
com.github.stuxuhai.jpinyin.PinyinExceptionpublic static String getFullSpell(String source) throws com.github.stuxuhai.jpinyin.PinyinException
source - 来源字符串com.github.stuxuhai.jpinyin.PinyinException - 拼音异常public static String bytesToHexString(byte[] byteArray)
byteArray - byte[] datapublic static byte[] hexStringToBytes(String hexString)
hexString - the hex stringpublic static int whether(Object obj)
public static com.alibaba.fastjson.JSONArray buildTree(List<com.alibaba.fastjson.JSONObject> list, String upkey, String key)
list - 数据列表upkey - 父节点字段key - 与父节点对应的字段public static com.alibaba.fastjson.JSONArray buildTree(List<com.alibaba.fastjson.JSONObject> list, String upkey, String key, String rootKey)
list - 数据列表upkey - 父节点字段key - 与父节点对应的字段rootKey - 根节点key,默认:_rootCopyright © 2024. All rights reserved.