I have a string in the format of
"SERVERID=12345\nSERVERKEY=asdasw\nSERVERAPPID=123213\n"
I've parsed this line by line using strtok()
.
Is there a way to make a key-value pair of each line? Like maybe store them in some sort of an array? What I mean is, if I want SERVERID
, I just say Array['SERVERID']
and it'll return 12345
as the value. Is there a way to do it in C?