src/Maleeby/MRest/Routing.php
public static function fixUri($url) {
        $url = preg_replace('#/+|\\\+#', '/', $url);

        if ($url[0] == '/') {
            $url = substr($url, 1, strlen($url));
        } if (substr($url, -1) == '/') {
            $url = substr($url, 0, strlen($url) - 1);
        }

        return $url;
    }
public static function fixUri($url) {
        $url = preg_replace('#/+|\\\+#', '/', $url);

        if ($url[0] == '/') {
            $url = substr($url, 1, strlen($url));
        } if (substr($url, -1) == '/') {
            $url = substr($url, 0, strlen($url) - 1);
        }

        return $url;
    }
public static function fixUri ( $ url ) { $ url = preg_replace ( '#/+|\\\+#' , '/' , $ url ) ; if ( $ url [ 0 ] == '/' ) { $ url = substr ( $ url , 1 , strlen ( $ url ) ) ; } if ( substr ( $ url , - 1 ) == '/' ) { $ url = substr ( $ url , 0 , strlen ( $ url ) - 1 ) ; } return $ url ; }
Fix the URI. Removes the multiple slashes

@param string $url URI
@return string The cleaned URI
Fix the URI . Removes the multiple slashes