com.github.sd4324530.fastweixin.util
类 StrUtil

java.lang.Object
  继承者 com.github.sd4324530.fastweixin.util.StrUtil

public final class StrUtil
extends Object

字符串常用方法工具类

作者:
peiyu

方法摘要
static boolean hasBlank(String... strs)
          判断一组字符串是否有空值
static boolean isBlank(String str)
          判断一个字符串是否为空,null也会返回true
static boolean isNotBlank(String str)
          判断一个字符串是否不为空
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

方法详细信息

isBlank

public static boolean isBlank(String str)
判断一个字符串是否为空,null也会返回true

参数:
str - 需要判断的字符串
返回:
是否为空,null也会返回true

isNotBlank

public static boolean isNotBlank(String str)
判断一个字符串是否不为空

参数:
str - 需要判断的字符串
返回:
是否为空

hasBlank

public static boolean hasBlank(String... strs)
判断一组字符串是否有空值

参数:
strs - 需要判断的一组字符串
返回:
判断结果,只要其中一个字符串为null或者为空,就返回true


Copyright © 2017. All rights reserved.