removeBetweenSpaceMayNull static method

String? removeBetweenSpaceMayNull(
  1. String? str, {
  2. bool removeLine = true,
})

移除str两端的(空格|制表符\t), 如果strnull或移除空白符号后得到空字符串则返回null

Implementation

static String? removeBetweenSpaceMayNull(
  String? str, {
  bool removeLine = true,
}) {
  if (null == str) {
    return null;
  }
  final result = removeBetweenSpace(str, removeLine: removeLine);
  if (result.isEmpty) {
    return null;
  }
  return result;
}