getResultMatch function

RegExpMatch? getResultMatch(
  1. String typeString
)

Match the typeString with the regex Example: 'Result<u8, bool>' -> 'Result<u8, bool>', 'Result', 'u8', 'bool' Example: 'Result<Result<u8, bool>, bool>' -> 'Result<Result<u8, bool>, bool>', 'Result', 'Result<u8, bool>', 'bool'

Implementation

RegExpMatch? getResultMatch(String typeString) {
  return RegExp(r'^([^<]*)<(.+),(.+)>$').firstMatch(typeString);
}