parse static method

HackerNewsItemUrl? parse(
  1. String url
)

Implementation

static HackerNewsItemUrl? parse(String url) {
  var matches = RegExp(r'(?:https?:)?\/\/news\.ycombinator\.com\/item\?id=(?<item>[0-9]+)').allMatches(url);
  var _id = matches.getValue("item");
  if (_id == null) return null;
  return HackerNewsItemUrl._(_id);
}