core/helpers/StringHelper.php
public static function typeCast($string)
    {
        if (is_numeric($string)) {
            return static::typeCastNumeric($string);
        } elseif (is_array($string)) {
            return ArrayHelper::typeCast($string);
        }
        
        return $string;
    }
public static function typeCast($string)
    {
        if (is_numeric($string)) {
            return static::typeCastNumeric($string);
        } elseif (is_array($string)) {
            return ArrayHelper::typeCast($string);
        }
        
        return $string;
    }
public static function typeCast ( $ string ) { if ( is_numeric ( $ string ) ) { return static :: typeCastNumeric ( $ string ) ; } elseif ( is_array ( $ string ) ) { return ArrayHelper :: typeCast ( $ string ) ; } return $ string ; }
TypeCast a string to its specific types.

Arrays will passed to to the {{luya\helpers\ArrayHelper::typeCast()}} class.

@param mixed $string The input string to type cast. Arrays will be passted to {{luya\helpers\ArrayHelper::typeCast()}}.
@return mixed The new type casted value, if the input is an array the output is the typecasted array.
TypeCast a string to its specific types .