日期:2014-05-16 浏览次数:20910 次
public
 static
 void
 TestStr(){
002
 | 
????
//null 和 ""操作~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
003
 | 
????
//判断是否Null 或者 ""
 | 
004
 | 
????
//System.out.println(StringUtils.isEmpty(null));
 | 
005
 | 
????
//System.out.println(StringUtils.isNotEmpty(null));
 | 
006
 | 
????
//判断是否null 或者 "" 去空格~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
007
 | 
????
//System.out.println(StringUtils.isBlank("? "));
 | 
008
 | 
????
//System.out.println(StringUtils.isNotBlank(null));
 | 
009
 | 
????
//去空格.Null返回null~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
010
 | 
????
//System.out.println(StringUtils.trim(null));
 | 
011
 | 
????
//去空格,将Null和"" 转换为Null
 | 
012
 | 
????
//System.out.println(StringUtils.trimToNull(""));
 | 
013
 | 
????
//去空格,将NULL 和 "" 转换为""
 | 
014
 | 
????
//System.out.println(StringUtils.trimToEmpty(null));
 | 
015
 | 
????
//可能是对特殊空格符号去除??
 | 
016
 | 
????
//System.out.println(StringUtils.strip("大家好? 啊? \t"));
 | 
017
 | 
????
//同上,将""和null转换为Null
 |