removeAllSpaceMayNull static method

String? removeAllSpaceMayNull(
  1. String? str
)

移除str所有空白符号,如果str为null或移除空白符号后是空字符串则返回null

Implementation

static String? removeAllSpaceMayNull(String? str) {
  if (null == str || str.isEmpty) {
    return null;
  }
  final result = removeAllSpace(str);
  if (result.isEmpty) {
    return null;
  }
  return result;
}