0

Hi.

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.

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Anon17
0

Hi.

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.

Try find from the string library.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.