I was planning on using the strtok() or strtok_r() functions, but it doesn't appear to be available on the WiFi Rev 2, but strtok_P() and strtok_rP() are available. However, they don't work for me because I get the full line string of text rather than parsed data. Here's an example of one of my attempts:
The output is: Geeks for Geeks.
The output should be:
Geeks
for
Geeks
So, I was wondering two things:
a) why aren't strtok() and strtok_r() available, and is it okay to continue using strtok_rP()?
b) why is the strtok_rP() not parsing correctly, and how do I get it to parse properly?
Hello, Stefan - the board is the WiFi Rev 2. I had tried the suggestion of using variables in PROGMEM (after finding it via Google), but it didn't work for me either.
They SHOULD be available...
What makes you think they aren't?
The following (complete, minimal (hint)) sketch compiles fine for a Uno WiFi2.
(I don't actually have a UW2, so I didn't actually test it...)
Sorry for the delay in responding - busy week. The issue was with Visual Studio (VS) IDE. I didn't bother to try to reconfigure VS, I switched to processing the String in a loop. I know, I know...not efficient, but I prefer to use VS and the string is very short. Anyhow, thanks for the answers/responses - all of your feedback pointed me to evaluate the difference between the Arduino IDE compiling and the VS IDE compiling. (not sure which to mark as solution, they were all helpful)