UCE Docs / route_path_normalize

Signature

String route_path_normalize(String path)

Trims whitespace and removes leading/trailing / from a route path without deciding whether the path is safe.

For route data that may be used to compose file paths, prefer route_path_sanitize() or runtime-populated context.params["ROUTE_PATH"].

Example

print(route_path_normalize("/docs/index/"), "\n");
Output
docs/index