src/Core/Convert.php
public static function slashes($path, $separator = DIRECTORY_SEPARATOR, $multiple = true)
    {
        if ($multiple) {
            return preg_replace('#[/\\\\]+#', $separator, $path);
        }
        return str_replace(['/', '\\'], $separator, $path);
    }
public static function slashes($path, $separator = DIRECTORY_SEPARATOR, $multiple = true)
    {
        if ($multiple) {
            return preg_replace('#[/\\\\]+#', $separator, $path);
        }
        return str_replace(['/', '\\'], $separator, $path);
    }
public static function slashes ( $ path , $ separator = DIRECTORY_SEPARATOR , $ multiple = true ) { if ( $ multiple ) { return preg_replace ( '#[/\\\\]+#' , $ separator , $ path ) ; } return str_replace ( [ '/' , '\\' ] , $ separator , $ path ) ; }
Convert slashes in relative or asolute filesystem path. Defaults to DIRECTORY_SEPARATOR

@param string $path
@param string $separator
@param bool $multiple Collapses multiple slashes or not
@return string
Convert slashes in relative or asolute filesystem path . Defaults to DIRECTORY_SEPARATOR