public static function convertCase(
        /*# string */ $string,
        /*# string */ $toCase
    )/*# string */ {
        // break into lower case words
        $str = strtolower(ltrim(
            preg_replace(['/[A-Z]/', '/[_]/'], [' $0', ' '], $string)
        ));

        switch (strtoupper($toCase)) {
            case 'PASCAL':
                return str_replace(' ', '', ucwords($str));
            case 'CAMEL' :
                return lcfirst(str_replace(' ', '', ucwords($str)));
            default: // SNAKE
                return str_replace(' ', '_', $str);
        }
    }