I have a function which checks for a placement of a substring in a buffer after recieving it over TPC. It checks for the value up until a '&' appears in the string (As the value can be any length). However, my program crashes if the packet has no '&' symbol (For example, when the value is longer than the packet length and as such goes into the next packet).
Is there a method to check if a character ('&' in this case) exists in a string?
Thanks in advance.