I went and appended '\0' to the end of inputstring and now I get this on Serial Monitor. It did clean up the end of the input string.
Do I need to add '\0' to the strtok command when extracting the individual fields? or does strtok take care of that?
Formatting MD Command:
inputstring: [795631813456 MEXICO 5/25/2019 A10012345
Delimiters: [|
Formatting MD Command:
field1: [MEXICO]
field2: [5/25/2019]
field3: [A10012345]
]
field5: []
field6: []
field7: []
field8: []
field9: []
field10: []
1: [MEXICO
1: [MEXICO 5/25/2019
1: [MEXICO 5/25/2019 A10012345
]