shrinkCliOptName method

String shrinkCliOptName({
  1. bool withPrefix = false,
})

Removes all unwanted characters from the given string

Implementation

String shrinkCliOptName({bool withPrefix = false}) {
  var result = replaceAll(_shrinkRE, '');
  var length = result.length;

  if (length <= 0) {
    return this;
  }

  return (withPrefix ? this[0] + result : result);
}