def METHOD_NAME(self) -> str:
    pos = 0
    while not self.eof:
        try:
            current = self.buffer[self.index + pos]
            if current.isspace():
                break
            pos += 1
        except IndexError:
            break
    self.previous: int = self.index
    result = self.buffer[self.index : self.index + pos]
    self.index += pos
    return result