public class StringUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ENCODING_GBK |
static String |
ENCODING_UTF8 |
| 构造器和说明 |
|---|
StringUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
byteToStr(byte[] b,
String encode) |
static String |
byteToStrGbk(byte[] b) |
static String |
byteToStrUtf8(byte[] b) |
static boolean |
containsUserDefinedUnicode(String string) |
static int |
countTotal(String str,
String encode) |
static int |
countTotalGbk(String str) |
static String |
getUUID32() |
static boolean |
isChineseChar(char c) |
static byte[] |
strToByte(String str,
String encode) |
static byte[] |
strToByteGbk(String str) |
static byte[] |
strToByteUtf8(String str) |
static String |
substringByByte(String orignal,
int count,
int countTotal) |
static String |
substringZzpdfJson(String jsonString) |
public static byte[] strToByteUtf8(String str)
str - public static byte[] strToByteGbk(String str)
str - public static String byteToStrUtf8(byte[] b)
b - public static String byteToStrGbk(byte[] b)
b - public static boolean isChineseChar(char c)
throws UnsupportedEncodingException
public static String substringByByte(String orignal, int count, int countTotal) throws UnsupportedEncodingException
orignal - count - countTotal - UnsupportedEncodingExceptionpublic static int countTotal(String str, String encode) throws UnsupportedEncodingException
public static int countTotalGbk(String str) throws UnsupportedEncodingException
public static String getUUID32()
public static boolean containsUserDefinedUnicode(String string)
string - Copyright © 2017–2021 cn.gtmap. All rights reserved.