toRoute method

String toRoute()

Parses the string into a route path.

Implementation

String toRoute() {
  if (isWildcard()) return '/';
  return replaceAll('[', '<').replaceAll(']', '>').replaceAll(r'\', '/');
}