public function offsetExists($index)
    {
        $index = (int)$index;

        if ($index >= 0) return ($this->getLength() > $index);

        return ($this->getLength() >= abs($index));
    }
public function offsetExists($index)
    {
        $index = (int)$index;

        if ($index >= 0) return ($this->getLength() > $index);

        return ($this->getLength() >= abs($index));
    }
public function offsetExists ( $ index ) { $ index = ( int ) $ index ; if ( $ index >= 0 ) return ( $ this -> getLength ( ) > $ index ) ; return ( $ this -> getLength ( ) >= abs ( $ index ) ) ; }
Checks to see if the character index exists.

Implements part of the ArrayAccess interface. Offsets may be
negative to count from the last character in the string.

@param  int     $index The integer of the index to check.

@return boolean
Checks to see if the character index exists .