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
pathspecification. -
pathToRegExp(
String path, {List< String> ? parameters, bool prefix = false, bool caseSensitive = true}) → RegExp -
Creates a RegExp that matches a
pathspecification. -
rescapeGroup(
String group) → String -
Escapes a
groupto ensure it remains a capturing group. -
rextract(
List< String> parameters, Match match) → Map<String, String> -
Extracts arguments from
matchand maps them by parameter name. -
rparse(
String path, {List< String> ? parameters}) → List<RToken> -
Parses a
pathspecification. -
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.