I am receiving some strings from UART in AVR. Strings are chaotic, not deterministic. It also includes new line \n and carriage return \r characters that's why I couldn't find a solution including checking bytes if they are \n or \r.
So is there a way to determine the end of the data?
EDIT: For more details about the data I receive. I am acquiring some strings from my web server and they are commands to be used such as "weather+check\r\n". Another one is, for example, "time\r\nNew York+Check\r\n\r\". I simply want to get these strings and assign to a char array. But to do this I need to know when data ends so that I can go out of the While loop that I use to fill the array.