我将如何在 txt 中逐行检查下面的字符串并替换每个字符串?
"FLD_CUSTORDREF_FLD"
"FLD_CUSTOMERNAME_FLD"
"FLD_ADDRESSLINE1_FLD"
"FLD_ADDRESSLINE2_FLD"
"FLD_CITY_FLD"
例如
If file line has "FLD_CITY_FLD"
change to Header->City
else if file line has "FLD_CUSTOMERNAME_FLD"
change to Header->Name
我可以通过使用阅读每一行
while ( fgets ( line, sizeof line, file ) != NULL )
但是我将如何检查匹配的字符串?