'Remove the first character_count characters from the internal buffer and
return them.'

def __extract_from_buffer(self, character_count):

    result = self.buffer[:character_count]
    self.buffer = self.buffer[character_count:]
    return result
