isUUID method

bool isUUID([
  1. Object? version
])

Check if the string is a UUID (version 3, 4 or 5).

Implementation

bool isUUID([Object? version]) {
  if (version == null) {
    version = 'all';
  } else {
    version = version.toString();
  }

  RegExp? pat = RegexUtils.uuid[version];
  return (pat != null && pat.hasMatch(toUpperCase()));
}