java中,StringUtils类中的一些常用方法
boolean isBlank ( String str)
StringUtils . isBlank ( null ) = true
StringUtils . isBlank ( "" ) = true
StringUtils . isBlank ( " " ) = true
StringUtils . isBlank ( " " ) = true
StringUtils . isBlank ( "\t \n \f \r" ) = true
StringUtils . isBlank ( "\b" ) = false
StringUtils . isBlank ( "bob" ) = false
StringUtils . isBlank ( " bob " ) = false boolean isNotBlank ( 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 boolean isEmpty ( String str)
StringUtils . isEmpty ( null ) = true
StringUtils . isEmpty ( "" ) = true
StringUtils . isEmpty ( " " ) = false
StringUtils . isEmpty ( " " ) = false
StringUtils . isEmpty ( "bob" ) = false
StringUtils . isEmpty ( " bob " ) = false boolean isNotEmpty ( String str)
StringUtils . isNotEmpty ( null ) = false
StringUtils . isNotEmpty ( "" ) = false
StringUtils . isNotEmpty ( " " ) = true
StringUtils . isNotEmpty ( " " ) = true
StringUtils . isNotEmpty ( "bob" ) = true
StringUtils . isNotEmpty ( " bob " ) = true String trim ( String str)
StringUtils . trim ( null ) = null
StringUtils . trim ( "" ) = ""
StringUtils . trim ( " " ) = ""
StringUtils . trim ( " \b \t \n \f \r " ) = ""
StringUtils . trim ( " \n\tss \b" ) = "ss"
StringUtils . trim ( " d d dd " ) = "d d dd"
StringUtils . trim ( "dd " ) = "dd"
StringUtils . trim ( " dd " ) = "dd" String trimToNull ( String str)
StringUtils . trimToNull ( null ) = null
StringUtils . trimToNull ( "" ) = null
StringUtils . trimToNull ( " " ) = null
StringUtils . trimToNull ( " \b \t \n \f \r " ) = null
StringUtils . trimToNull ( " \n\tss \b" ) = "ss"
StringUtils . trimToNull ( " d d dd " ) = "d d dd"
StringUtils . trimToNull ( "dd " ) = "dd"
StringUtils . trimToNull ( " dd " ) = "dd" String trimToEmpty ( String str)
StringUtils . trimToEmpty ( null ) = ""
StringUtils . trimToEmpty ( "" ) = ""
StringUtils . trimToEmpty ( " " ) = ""
StringUtils . trimToEmpty ( " \b \t \n \f \r " ) = ""
StringUtils . trimToEmpty ( " \n\tss \b" ) = "ss"
StringUtils . trimToEmpty ( " d d dd " ) = "d d dd"
StringUtils . trimToEmpty ( "dd " ) = "dd"
StringUtils . trimToEmpty ( " dd " ) = "dd" String strip ( String str)
StringUtils . strip ( null ) = null
StringUtils . strip ( "" ) = ""
StringUtils . strip ( " " ) = ""
StringUtils . strip ( " \b \t \n \f \r " ) = "\b"
StringUtils . strip ( " \n\tss \b" ) = "ss \b"
StringUtils . strip ( " d d dd " ) = "d d dd"
StringUtils . strip ( "dd " ) = "dd"
StringUtils . strip ( " dd " ) = "dd" String stripToNull ( String str)
StringUtils . stripToNull ( null ) = null
StringUtils . stripToNull ( "" ) = null
StringUtils . stripToNull ( " " ) = null
StringUtils . stripToNull ( " \b \t \n \f \r " ) = "\b"
StringUtils . stripToNull ( " \n\tss \b" ) = "ss \b"
StringUtils . stripToNull ( " d d dd " ) = "d d dd"
StringUtils . stripToNull ( "dd " ) = "dd"
StringUtils . stripToNull ( " dd " ) = "dd" String stripToEmpty ( String str)
StringUtils . stripToNull ( null ) = ""
StringUtils . stripToNull ( "" ) = ""
StringUtils . stripToNull ( " " ) = ""
StringUtils . stripToNull ( " \b \t \n \f \r " ) = "\b"
StringUtils . stripToNull ( " \n\tss \b" ) = "ss \b"
StringUtils . stripToNull ( " d d dd " ) = "d d dd"
StringUtils . stripToNull ( "dd " ) = "dd"
StringUtils . stripToNull ( " dd " ) = "dd"