stringIsEmpty static method

bool stringIsEmpty(
  1. dynamic str
)

@description: 判断字符串是否为空 @param {} @return {}

Implementation

static bool stringIsEmpty(dynamic str) {
  if (str == null) {
    return true;
  }

  if (!(str is String)) {
    return true;
  }

  if (str.length < 1) {
    return true;
  }

  return false;
}