src/Viserio/Component/Routing/Dispatcher/SimpleDispatcher.php
protected function prepareUriPath(string $path): string
    {
        $path = '/' . \ltrim($path, '/');

        if (\strlen($path) !== 1 && \substr($path, -1) === '/') {
            $path = \substr_replace($path, '', -1);
        }

        return $path;
    }
protected function prepareUriPath(string $path): string
    {
        $path = '/' . \ltrim($path, '/');

        if (\strlen($path) !== 1 && \substr($path, -1) === '/') {
            $path = \substr_replace($path, '', -1);
        }

        return $path;
    }
Prepare the request uri path.

@param string $path

@return string