public function readPascalString($offset = 0, $read_offset = false)
    {

        // Get the proper offset
        $len = $this->readInt8();
        $offset = max($len - $offset, 0);

        // Read the data
        if ($read_offset) {
            return $this->read($offset);
        } else {
            return substr($this->read($len), 0, $offset);
        }
    }
public function readPascalString($offset = 0, $read_offset = false)
    {

        // Get the proper offset
        $len = $this->readInt8();
        $offset = max($len - $offset, 0);

        // Read the data
        if ($read_offset) {
            return $this->read($offset);
        } else {
            return substr($this->read($len), 0, $offset);
        }
    }
public function readPascalString ( $ offset = 0 , $ read_offset = false ) { // Get the proper offset $ len = $ this -> readInt8 ( ) ; $ offset = max ( $ len - $ offset , 0 ) ; // Read the data if ( $ read_offset ) { return $ this -> read ( $ offset ) ; } else { return substr ( $ this -> read ( $ len ) , 0 , $ offset ) ; } }
Reads a pascal string from the buffer

@param int  $offset      Number of bits to cut off the end
@param bool $read_offset True if the data after the offset is to be read

@return string
@throws \GameQ\Exception\Protocol
Reads a pascal string from the buffer