nitcorn :: Routes :: []
Route
key
# Get the first `Route` than has `key` as prefix to its path fun [](key: String): nullable Route do for route in routes do var path = route.path if path == null or key.has_prefix(path) then return route end return null end
# Use `Route::match` instead of `==`. redef fun [](key) do for route in routes do if route.match(key) then return route end return null end