P
P
Pavel K2022-04-08 16:42:06
C++ / C#
Pavel K, 2022-04-08 16:42:06

What are some good ways to parse a file?

Greetings!
There are text files with the same line structure:

header
id:key:value
id:key:value
.....
content
footer:key:value


Can you advise the most "correct" way in your opinion to parse?
And then something regular, in my opinion, has long been outdated, but nothing better comes to mind.
Preferably without third-party libraries.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2022-04-08
@gbg

If id, key, and value do not contain colons, all this is steamed by a banal split on this character.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question