锘??xml version="1.0" encoding="utf-8" standalone="yes"?>精品免费av一区二区三区,久久韩国免费视频,国产精品久久久一区二区http://www.aygfsteel.com/java-hl/category/50431.htmlJavaBirdzh-cnThu, 22 Dec 2011 06:46:55 GMTThu, 22 Dec 2011 06:46:55 GMT60StringUtils鐨刬sBlank涓巌sEmply(杞澆)http://www.aygfsteel.com/java-hl/archive/2011/12/16/366539.htmlJavaBirdJavaBirdFri, 16 Dec 2011 07:59:00 GMThttp://www.aygfsteel.com/java-hl/archive/2011/12/16/366539.htmlhttp://www.aygfsteel.com/java-hl/comments/366539.htmlhttp://www.aygfsteel.com/java-hl/archive/2011/12/16/366539.html#Feedback0http://www.aygfsteel.com/java-hl/comments/commentRss/366539.htmlhttp://www.aygfsteel.com/java-hl/services/trackbacks/366539.html1. public static boolean isEmpty(String str)

銆銆鍒ゆ柇鏌愬瓧絎︿覆鏄惁涓虹┖錛屼負絀虹殑鏍囧噯鏄?str==null 鎴?str.length()==0

銆銆涓嬮潰鏄?StringUtils 鍒ゆ柇鏄惁涓虹┖鐨勭ず渚嬶細

銆銆StringUtils.isEmpty(null) = true

銆銆StringUtils.isEmpty("") = true

銆銆StringUtils.isEmpty(" ") = false //娉ㄦ剰鍦?StringUtils 涓┖鏍間綔闈炵┖澶勭悊

銆銆StringUtils.isEmpty("   ") = false

銆銆StringUtils.isEmpty("bob") = false

銆銆StringUtils.isEmpty(" bob ") = false

銆銆2. public static boolean isNotEmpty(String str)

銆銆鍒ゆ柇鏌愬瓧絎︿覆鏄惁闈炵┖錛岀瓑浜?!isEmpty(String str)

銆銆涓嬮潰鏄ず渚嬶細

銆銆StringUtils.isNotEmpty(null) = false

銆銆StringUtils.isNotEmpty("") = false

銆銆StringUtils.isNotEmpty(" ") = true

銆銆StringUtils.isNotEmpty("         ") = true

銆銆StringUtils.isNotEmpty("bob") = true

銆銆StringUtils.isNotEmpty(" bob ") = true

銆銆3. public static boolean isBlank(String str)

銆銆鍒ゆ柇鏌愬瓧絎︿覆鏄惁涓虹┖鎴栭暱搴︿負0鎴栫敱絀虹櫧絎?whitespace) 鏋勬垚

銆銆涓嬮潰鏄ず渚嬶細

銆銆StringUtils.isBlank(null) = true

銆銆StringUtils.isBlank("") = true

銆銆StringUtils.isBlank(" ") = true

銆銆StringUtils.isBlank("        ") = true

銆銆StringUtils.isBlank("\t \n \f \r") = true   //瀵逛簬鍒惰〃絎︺佹崲琛岀銆佹崲欏電鍜屽洖杞︾

銆銆StringUtils.isBlank()   //鍧囪瘑涓虹┖鐧界

銆銆StringUtils.isBlank("\b") = false   //"\b"涓哄崟璇嶈竟鐣岀

銆銆StringUtils.isBlank("bob") = false

銆銆StringUtils.isBlank(" bob ") = false

銆銆4. public static boolean isNotBlank(String str)

銆銆鍒ゆ柇鏌愬瓧絎︿覆鏄惁涓嶄負絀轟笖闀垮害涓嶄負0涓斾笉鐢辯┖鐧界(whitespace) 鏋勬垚錛岀瓑浜?!isBlank(String str)

銆銆涓嬮潰鏄ず渚嬶細

銆銆StringUtils.isNotBlank(null) = false

銆銆StringUtils.isNotBlank("") = false

銆銆StringUtils.isNotBlank(" ") = false

銆銆StringUtils.isNotBlank("         ") = false

銆銆StringUtils.isNotBlank("\t \n \f \r") = false

銆銆StringUtils.isNotBlank("\b") = true

銆銆StringUtils.isNotBlank("bob") = true

銆銆StringUtils.isNotBlank(" bob ") = true



JavaBird 2011-12-16 15:59 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 绵阳市| 延长县| 教育| 衡水市| 英超| 永嘉县| 迭部县| 屯留县| 西昌市| 玉门市| 凤山市| 祁连县| 乐都县| 广汉市| 夏邑县| 乌拉特中旗| 洛南县| 大足县| 铅山县| 时尚| 巧家县| 应城市| 嵊泗县| 同心县| 屏山县| 林州市| 沁源县| 项城市| 商南县| 闽侯县| 永平县| 务川| 巢湖市| 兴安县| 尖扎县| 和平区| 华安县| 福安市| 义马市| 汉川市| 井冈山市|