isBool static method

bool isBool(
  1. String s
)

检查字符串是否为布尔值

Implementation

static bool isBool(String s) {
  if (ObjectUtils.isNull(s)) {
    return false;
  }
  return (s == 'true' || s == 'false');
}