public static function getPart($string, $index, $default = null)
    {
        $parts = self::explode($string);

        if ($index < 0) {
            $index = count($parts) + $index;
        }

        return isset($parts[$index]) ? $parts[$index] : $default;
    }
public static function getPart($string, $index, $default = null)
    {
        $parts = self::explode($string);

        if ($index < 0) {
            $index = count($parts) + $index;
        }

        return isset($parts[$index]) ? $parts[$index] : $default;
    }
public static function getPart ( $ string , $ index , $ default = null ) { $ parts = self :: explode ( $ string ) ; if ( $ index < 0 ) { $ index = count ( $ parts ) + $ index ; } return isset ( $ parts [ $ index ] ) ? $ parts [ $ index ] : $ default ; }
Gets a part of a CamelCased word by index

Use a negative index to start at the last part of the word (-1 is the
last part)

@param   string  Word
@param   integer Index of the part
@param   string  Default value
Gets a part of a CamelCased word by index