fromCodeName function

String fromCodeName(
  1. String str
)

convert from the code-name

Implementation

String fromCodeName(String str) {
  final nonEscaped = str.replaceAll(_escape, '=');
  final prefixRemoved = nonEscaped.replaceFirst(_prefix, '');
  final encoded = prefixRemoved.toUpperCase();
  final bytes = base32.decode(encoded);
  final decoded = utf8.decode(bytes);
  return decoded;
}