类 StringUtil
- java.lang.Object
-
- org.sagacity.sqltoy.utils.StringUtil
-
public class StringUtil extends Object
- 版本:
- v1.0,Date:Oct 19, 2007 10:09:42 AM
- 作者:
- zhongxuchen
-
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static StringaddLeftZero2Len(String source, int length)static StringaddRightBlank2Len(String source, int length)static StringaddRightZero2Len(String source, int length)static StringappendStr(String source, String sign, int size, boolean isLeft)static voidarrayTrim(String[] params)static StringclearMistyChars(String source, String target)static StringfillArgs(String template, Object... args)static StringfirstToLowerCase(String sourceStr)static StringfirstToUpperCase(String sourceStr)static StringfirstToUpperOtherToLower(String sourceStr)static intgetSymMarkIndex(String beginMarkSign, String endMarkSign, String source, int startIndex)static intgetSymMarkIndexIgnoreCase(String beginMarkSign, String endMarkSign, String source, int startIndex)static intgetSymMarkMatchIndex(String beginMarkSign, String endMarkSign, String source, int startIndex)static booleanhasChinese(String str)static String[]humpFieldNames(String[] labelNames)static StringhumpToSplitStr(String source, String split)static intindexOfIgnoreCase(String source, String pattern)static intindexOfIgnoreCase(String source, String pattern, int start)static intindexOrder(String source, String regex, int order)static booleanisBlank(Object str)static booleanisNotBlank(Object str)static booleanlike(String source, String[] keywords)static StringlinkAry(String sign, boolean skipNull, Object... arys)static StringloopAppendWithSign(String source, String sign, int loopSize)static intmatchCnt(String source, String regex)static intmatchCnt(String source, String regex, int beginIndex, int endIndex)static intmatchCnt(String source, Pattern pattern)static booleanmatches(String source, String regex)static booleanmatches(String source, Pattern pattern)static intmatchIndex(String source, String regex)static int[]matchIndex(String source, String regex, int start)static intmatchIndex(String source, Pattern pattern)static int[]matchIndex(String source, Pattern pattern, int start)static intmatchLastIndex(String source, String regex)static intmatchLastIndex(String source, Pattern pattern)static StringreplaceAllStr(String source, String template, String target)static StringreplaceAllStr(String source, String template, String target, int fromIndex)static StringreplaceAllStr(String source, String template, String target, int fromIndex, int endIndex)static StringsecureMask(Object value, int preLength, int tailLength, String maskStr)static String[]splitExcludeSymMark(String source, String splitSign, HashMap filterMap)static int[]str2ASCII(String str)static StringtoDBC(String SBCStr)static StringtoHumpStr(String source, boolean firstIsUpperCase)static StringtoHumpStr(String source, boolean firstIsUpperCase, boolean removeDealine)static StringtoString(Object obj)static Stringtrim(String str)
-
-
-
方法详细资料
-
isNotBlank
public static boolean isNotBlank(Object str)
- 参数:
str-- 返回:
-
isBlank
public static boolean isBlank(Object str)
-
clearMistyChars
public static String clearMistyChars(String source, String target)
- 参数:
source-target-- 返回:
-
firstToUpperOtherToLower
public static String firstToUpperOtherToLower(String sourceStr)
- 参数:
sourceStr-- 返回:
-
indexOfIgnoreCase
public static int indexOfIgnoreCase(String source, String pattern)
- 参数:
source-pattern-- 返回:
-
addLeftZero2Len
public static String addLeftZero2Len(String source, int length)
- 参数:
source-length-- 返回:
-
addRightBlank2Len
public static String addRightBlank2Len(String source, int length)
- 参数:
source-length-- 返回:
-
loopAppendWithSign
public static String loopAppendWithSign(String source, String sign, int loopSize)
- 参数:
source-sign-loopSize-- 返回:
-
appendStr
public static String appendStr(String source, String sign, int size, boolean isLeft)
- 参数:
source-sign-size-isLeft-
-
getSymMarkIndex
public static int getSymMarkIndex(String beginMarkSign, String endMarkSign, String source, int startIndex)
- 参数:
beginMarkSign-endMarkSign-source-startIndex-- 返回:
-
getSymMarkIndexIgnoreCase
public static int getSymMarkIndexIgnoreCase(String beginMarkSign, String endMarkSign, String source, int startIndex)
- 参数:
beginMarkSign-endMarkSign-source-startIndex-- 返回:
-
getSymMarkMatchIndex
public static int getSymMarkMatchIndex(String beginMarkSign, String endMarkSign, String source, int startIndex)
- 参数:
beginMarkSign-endMarkSign-source-startIndex-- 返回:
-
matchCnt
public static int matchCnt(String source, String regex, int beginIndex, int endIndex)
- 参数:
source-regex-beginIndex-endIndex-- 返回:
-
indexOrder
public static int indexOrder(String source, String regex, int order)
- 参数:
source-regex-order-- 返回:
-
str2ASCII
public static int[] str2ASCII(String str)
- 参数:
str-- 返回:
-
splitExcludeSymMark
public static String[] splitExcludeSymMark(String source, String splitSign, HashMap filterMap)
- 参数:
source-splitSign- 如逗号、分号、冒号或具体字符串,非正则表达式filterMap-- 返回:
-
toHumpStr
public static String toHumpStr(String source, boolean firstIsUpperCase, boolean removeDealine)
- 参数:
source-firstIsUpperCase-removeDealine-- 返回:
-
secureMask
public static String secureMask(Object value, int preLength, int tailLength, String maskStr)
- 参数:
value-preLength-tailLength-maskStr-- 返回:
-
hasChinese
public static boolean hasChinese(String str)
- 参数:
str-- 返回:
-
humpToSplitStr
public static String humpToSplitStr(String source, String split)
- 参数:
source-split-- 返回:
-
replaceAllStr
public static String replaceAllStr(String source, String template, String target)
- 参数:
source-template-target-- 返回:
-
replaceAllStr
public static String replaceAllStr(String source, String template, String target, int fromIndex)
-
replaceAllStr
public static String replaceAllStr(String source, String template, String target, int fromIndex, int endIndex)
-
linkAry
public static String linkAry(String sign, boolean skipNull, Object... arys)
- 参数:
sign-skipNull-arys-- 返回:
-
like
public static boolean like(String source, String[] keywords)
- 参数:
source-keywords- 将匹配的字符用空格或者%进行切割并trim变成字符数组进行匹配- 返回:
-
arrayTrim
public static void arrayTrim(String[] params)
-
-