Method MatchRouteExpression
MatchRouteExpression(in ReadOnlySpan<char>, in ReadOnlySpan<char>, StringComparison)
Attempts to match the specified route expression against the given path.
public static RouteMatch MatchRouteExpression(in ReadOnlySpan<char> routeExpression, in ReadOnlySpan<char> path, StringComparison stringComparer = StringComparison.Ordinal)
Parameters
routeExpression
ReadOnlySpan<char>The route expression to match.
path
ReadOnlySpan<char>The path to match against the route expression.
stringComparer
StringComparisonThe string comparison to use when matching the route expression. Defaults to Ordinal.
Returns
- RouteMatch
A RouteMatch object indicating the result of the match.
MatchRouteExpression(string, string, StringComparison)
Attempts to match the specified route expression against the given path.
public static RouteMatch MatchRouteExpression(string routeExpression, string path, StringComparison stringComparer = StringComparison.Ordinal)
Parameters
routeExpression
stringThe route expression to match.
path
stringThe path to match against the route expression.
stringComparer
StringComparisonThe string comparison to use when matching the route expression. Defaults to Ordinal.
Returns
- RouteMatch
A RouteMatch object indicating the result of the match.