util/path_regex library

Classes

RParameterToken
Corresponds to a parameter of a path specification.
RPathToken
Corresponds to a non-parameterized section of a path specification.
RToken
The base type of all tokens produced by a path specification.

Functions

pathToFunction(String path) RPathFunction
Creates a RPathFunction from a path specification.
pathToRegExp(String path, {List<String>? parameters, bool prefix = false, bool caseSensitive = true}) RegExp
Creates a RegExp that matches a path specification.
rescapeGroup(String group) String
Escapes a group to ensure it remains a capturing group.
rextract(List<String> parameters, Match match) Map<String, String>
Extracts arguments from match and maps them by parameter name.
rparse(String path, {List<String>? parameters}) List<RToken>
Parses a path specification.
tokensToFunction(List<RToken> tokens) RPathFunction
Creates a RPathFunction from tokens.
tokensToRegExp(List<RToken> tokens, {bool prefix = false, bool caseSensitive = true}) RegExp
Creates a RegExp from tokens.

Typedefs

RPathFunction = String Function(Map<String, String> args)
Generates a path by populating a path specification with args.