I would like to check for certain characters in an array at certain positions.
The array starts with $$$$ then has eight characters then another $, eight more characters and finishes with $$$$. For example char my_array[50] = "$$$$01FF4C68$02543EFE$$$$";
I want to check that all the positions where there are supposed to be $ do have them.
I could split the array into the three parts that contain the characters and then test for them separately but is there a better way of doing this?
strstr?$$$$+ 8 +$+ 8 +$$$$? If so, just use a loop and keep track of the position.