src/classes/CCStr.php
public static function charset( $charset = null ) 
	{	
		switch( $charset ) 
		{	
			case 'pass':
			case 'secure':
			case 'password':
				return static::SECURE;
			break;

			case 'key':
				return static::KEY;
			break;

			case 'alphanum':
				return static::ALPHA_NUM;
			break;

			case 'alpha':
				return static::ALPHA;
			break;

			case 'alpha_low':
			case 'lowercase':
				return static::ALPHA_LOW;
			break;

			case 'alpha_up':
			case 'uppercase':
				return static::ALPHA_UP;
			break;

			case 'numeric':
			case 'num':
				return static::NUM;
			break;

			case 'hex':
				return static::HEX;
			break;

			case 'bin':
				return static::BIN;
			break;

			default:
				if ( !is_null( $charset ) ) 
				{
					return $charset;
				}
				return static::charset( 'alphanum' );
			break;
		}
	}
public static function charset( $charset = null ) 
	{	
		switch( $charset ) 
		{	
			case 'pass':
			case 'secure':
			case 'password':
				return static::SECURE;
			break;

			case 'key':
				return static::KEY;
			break;

			case 'alphanum':
				return static::ALPHA_NUM;
			break;

			case 'alpha':
				return static::ALPHA;
			break;

			case 'alpha_low':
			case 'lowercase':
				return static::ALPHA_LOW;
			break;

			case 'alpha_up':
			case 'uppercase':
				return static::ALPHA_UP;
			break;

			case 'numeric':
			case 'num':
				return static::NUM;
			break;

			case 'hex':
				return static::HEX;
			break;

			case 'bin':
				return static::BIN;
			break;

			default:
				if ( !is_null( $charset ) ) 
				{
					return $charset;
				}
				return static::charset( 'alphanum' );
			break;
		}
	}
public static function charset ( $ charset = null ) { switch ( $ charset ) { case 'pass' : case 'secure' : case 'password' : return static :: SECURE ; break ; case 'key' : return static :: KEY ; break ; case 'alphanum' : return static :: ALPHA_NUM ; break ; case 'alpha' : return static :: ALPHA ; break ; case 'alpha_low' : case 'lowercase' : return static :: ALPHA_LOW ; break ; case 'alpha_up' : case 'uppercase' : return static :: ALPHA_UP ; break ; case 'numeric' : case 'num' : return static :: NUM ; break ; case 'hex' : return static :: HEX ; break ; case 'bin' : return static :: BIN ; break ; default : if ( ! is_null ( $ charset ) ) { return $ charset ; } return static :: charset ( 'alphanum' ) ; break ; } }
Get a charset, a string containing a set of characters.

There are some predefined charsets like:
pass
secure
password
key
alphanum
alpha
alpha_low
lowercase
alpha_up
uppercase
numeric
num
hex
bin

Everything else gets returned as its own charset.

@param string		$charset		use predefined charset or your own
@return string
Get a charset a string containing a set of characters .