decode static method

String decode(
  1. String string
)

Decodes the utf-7 string to the corresponding utf-8 string.

Implementation

static String decode(String string) {
  return string.replaceAllMapped(RegExp(r'\+([A-Za-z0-9/+]*)-?'),
      (Match match) {
    if (match[1]!.isEmpty) return '+';
    return decodeModifiedBase64(match[1]!);
  });
}