public function offsetExists($offset)
    {
        $length = $this->length();
        $offset = (int) $offset;

        if ($offset >= 0) {
            return ($length > $offset);
        }

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

        if ($offset >= 0) {
            return ($length > $offset);
        }

        return ($length >= abs($offset));
    }
public function offsetExists ( $ offset ) { $ length = $ this -> length ( ) ; $ offset = ( int ) $ offset ; if ( $ offset >= 0 ) { return ( $ length > $ offset ) ; } return ( $ length >= abs ( $ offset ) ) ; }
Returns whether or not a character exists at an index. Offsets may be
negative to count from the last character in the string. Implements
part of the ArrayAccess interface.

@param  mixed   $offset The index to check
@return boolean Whether or not the index exists
Returns whether or not a character exists at an index . Offsets may be negative to count from the last character in the string . Implements part of the ArrayAccess interface .