public static function isSlug($string, $with_slash=true)
    {
        if ($with_slash)
            $match = '/'.self::SLUG_WITH_SLASH_MATCH.'/';
        else
            $match = '/'.self::SLUG_MATCH.'/';

        return preg_match($match, $string) > 0;
    }
public static function isSlug($string, $with_slash=true)
    {
        if ($with_slash)
            $match = '/'.self::SLUG_WITH_SLASH_MATCH.'/';
        else
            $match = '/'.self::SLUG_MATCH.'/';

        return preg_match($match, $string) > 0;
    }
public static function isSlug ( $ string , $ with_slash = true ) { if ( $ with_slash ) $ match = '/' . self :: SLUG_WITH_SLASH_MATCH . '/' ; else $ match = '/' . self :: SLUG_MATCH . '/' ; return preg_match ( $ match , $ string ) > 0 ; }
Determines if the string given is a slug or not.

@param string  $string     The string to test
@param boolean $with_slash If true, then slashes will be allowed in the slug

@return boolean True if string is a slug
Determines if the string given is a slug or not .