public static function str2url($str)
    {
        $str = self::rus2translit($str);
        $str = strtolower($str);
        $str = preg_replace('~[^-a-z0-9_]+~u', '-', $str);
        $str = trim($str, "-");
        return $str;
    }
public static function str2url($str)
    {
        $str = self::rus2translit($str);
        $str = strtolower($str);
        $str = preg_replace('~[^-a-z0-9_]+~u', '-', $str);
        $str = trim($str, "-");
        return $str;
    }
public static function str2url ( $ str ) { $ str = self :: rus2translit ( $ str ) ; $ str = strtolower ( $ str ) ; $ str = preg_replace ( '~[^-a-z0-9_]+~u' , '-' , $ str ) ; $ str = trim ( $ str , "-" ) ; return $ str ; }
String to url

@param string $str
@return string
String to url