urlToId static method

String urlToId(
  1. String url
)

Implementation

static String urlToId(String url) {
  String result = "";
  Iterable<RegExpMatch> matches = new RegExp(r"[0-9]")
      .allMatches(new RegExp(r"\/-?[0-9]+\/$").stringMatch(url)!);
  for (Match m in matches) {
    result += m.group(0)!;
  }
  return result;
}