• StringUtils


    public static boolean isEmpty(CharSequence... css)

    public static boolean isAnyEmpty(CharSequence... css)
    任意一个参数为空的话,返回true,
    如果这些参数都不为空的话返回false。
    在写一些判断条件的时候,这个方法还是很实用的。
    StringUtils.isAnyEmpty(null) = true
    StringUtils.isAnyEmpty(null, "foo") = true
    StringUtils.isAnyEmpty("", "bar") = true
    StringUtils.isAnyEmpty("bob", "") = true
    StringUtils.isAnyEmpty(" bob ", null) = true
    StringUtils.isAnyEmpty(" ", "bar") = false
    StringUtils.isAnyEmpty("foo", "bar") = false

    public static boolean isAnyEmpty(CharSequence... css)
    任意一个参数为空的话,返回true,
    如果这些参数都不为空的话返回false。
    在写一些判断条件的时候,这个方法还是很实用的。
    StringUtils.isAnyEmpty(null) = true
    StringUtils.isAnyEmpty(null, "foo") = true
    StringUtils.isAnyEmpty("", "bar") = true
    StringUtils.isAnyEmpty("bob", "") = true
    StringUtils.isAnyEmpty(" bob ", null) = true
    StringUtils.isAnyEmpty(" ", "bar") = false
    StringUtils.isAnyEmpty("foo", "bar") = false

    public static boolean isNotEmpty(CharSequence cs)
    最常用函数之一,跟上面方法相对
    StringUtils.isNotEmpty(null) = false
    StringUtils.isNotEmpty("") = false
    StringUtils.isNotEmpty(" ") = true
    StringUtils.isNotEmpty("bob") = true
    StringUtils.isNotEmpty(" bob ") = true

  • 相关阅读:
    RSA算法原理(二)
    RSA算法原理(一)
    Diffie-Hellman 算法
    1028:Ignatius and the Princess III
    1014:Uniform Generator
    1013:Digital Roots
    常见OJ评判结果对照表
    Django模板系统
    Django之视图
    Django之路由系统
  • 原文地址:https://www.cnblogs.com/zi-yao/p/6598121.html
Copyright © 2020-2023  润新知