Есть ли способ прочитать вперед одну строку, чтобы проверить, содержит ли следующая строка определенные данные тега?
Я имею дело с форматом, который имеет начальный тег, но без конечного тега.
Я хотел бы прочитать строку, добавив ее в структуру, а затем проверить строку ниже, чтобы убедиться, что это не новый "node", и если он не продолжает добавлять, если он закрывает эту структуру и делает новый
Единственное решение, о котором я могу думать, состоит в том, чтобы иметь два потока считывателей, идущих в то же время, что-то похожее на путь блокировки, но это кажется бесполезным (если оно даже будет работать)
Мне нужно что-то вроде peek, но peekline