Remove resolved_path prefix from uri.

Mainly used to resolve and match mountable routes.

var route = new AppRoute("/")
assert route.uri_root("/user/10/profile") == "/user/10/profile"

route = new AppRoute("/user")
assert route.uri_root("/user/10/profile") == "/10/profile"

Property definitions

popcorn $ AppRoute :: uri_root
	# Remove `resolved_path` prefix from `uri`.
	#
	# Mainly used to resolve and match mountable routes.
	#
	# ~~~
	# var route = new AppRoute("/")
	# assert route.uri_root("/user/10/profile") == "/user/10/profile"
	#
	# route = new AppRoute("/user")
	# assert route.uri_root("/user/10/profile") == "/10/profile"
	# ~~~
	fun uri_root(uri: String): String do
		var path = resolve_path(uri)
		if path == "/" then return uri
		return uri.substring(path.length, uri.length).simplify_path
	end
lib/popcorn/pop_routes.nit:69,2--84,4