src/str/str.php
public static function unix_dir(string $path)
    {
        $path = str_replace('\\', '/', $path);
        $path = preg_replace('|(?<=.)/+|', '/', $path);
        if (':' === substr($path, 1, 1)) {
            $path = ucfirst($path);
        }
        return $path;
    }
public static function unix_dir(string $path)
    {
        $path = str_replace('\\', '/', $path);
        $path = preg_replace('|(?<=.)/+|', '/', $path);
        if (':' === substr($path, 1, 1)) {
            $path = ucfirst($path);
        }
        return $path;
    }
public static function unix_dir ( string $ path ) { $ path = str_replace ( '\\' , '/' , $ path ) ; $ path = preg_replace ( '|(?<=.)/+|' , '/' , $ path ) ; if ( ':' === substr ( $ path , 1 , 1 ) ) { $ path = ucfirst ( $ path ) ; } return $ path ; }
change windows directory into unix directory
change windows directory into unix directory