|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Objectim.yixin.sdk.util.StringUtil
public class StringUtil
字符串工具类
构造方法摘要 | |
---|---|
StringUtil()
|
方法摘要 | |
---|---|
static java.lang.String |
CR2Blank(java.lang.String src)
换行替换成空格 |
static android.os.Bundle |
decodeUrl(java.lang.String s)
|
static boolean |
isBlank(java.lang.CharSequence cs)
Checks if a CharSequence is whitespace, empty ("") or null. |
static boolean |
isNotBlank(java.lang.CharSequence cs)
Checks if a CharSequence is not empty (""), not null and not whitespace only. |
static android.os.Bundle |
parseUrl(java.lang.String url)
|
static java.lang.String |
substringByByteCount(java.lang.String str,
int byteCount,
boolean needDots)
取count个字节,中文为2个字节,英文为1个字节。 |
static java.lang.String |
substringByCharCount(java.lang.String str,
int charCount,
boolean needDots)
取count个char字符。 |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
public StringUtil()
方法详细信息 |
---|
public static boolean isBlank(java.lang.CharSequence cs)
Checks if a CharSequence is whitespace, empty ("") or null.
StringUtils.isBlank(null) = true StringUtils.isBlank("") = true StringUtils.isBlank(" ") = true StringUtils.isBlank("bob") = false StringUtils.isBlank(" bob ") = false
cs
- the CharSequence to check, may be null
true
if the CharSequence is null, empty or whitespacepublic static boolean isNotBlank(java.lang.CharSequence cs)
Checks if a CharSequence is not empty (""), not null and not whitespace only.
StringUtils.isNotBlank(null) = false StringUtils.isNotBlank("") = false StringUtils.isNotBlank(" ") = false StringUtils.isNotBlank("bob") = true StringUtils.isNotBlank(" bob ") = true
cs
- the CharSequence to check, may be null
true
if the CharSequence is not empty and not null and
not whitespacepublic static java.lang.String substringByByteCount(java.lang.String str, int byteCount, boolean needDots)
str
- 被处理字符串byteCount
- 截取字节数needDots
- 在字节数超过时是否加省略号public static java.lang.String substringByCharCount(java.lang.String str, int charCount, boolean needDots)
str
- 被处理字符串needDots
- 在字节数超过时是否加省略号public static java.lang.String CR2Blank(java.lang.String src)
src
- 源字符串
public static android.os.Bundle parseUrl(java.lang.String url)
public static android.os.Bundle decodeUrl(java.lang.String s)
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |