StringUtils 的用法

2017-02-13  本文已影响13人  _大风起兮云飞扬_

org.apache.commons.lang.StringUtils

public static boolean isEmpty(String str)

判断某字符串是否为empty,标准是 null == str 或 str.length() == 0

public static boolean isBlank(String str)

判断某字符串是否为blank,标准是 null == str 或 str.length() == 0 或 由一系列的空格组成,比如" "
这里有详细的说明:
http://blog.sina.com.cn/s/blog_4550f3ca0100qrsd.html

上一篇 下一篇

猜你喜欢

热点阅读