Timeout and overflow of arduino

"Just stop" is not really helpful to someone who doesn't know where to look for the brake pedal.

The basic problem is the Arduino reference, while very good, only really covers the Arduino functions. It doesn't reveal all of the other C and C++ libraries that are available. So people get unwittingly directed to use Strings instead of strings.

My preferred reference for the C string functions is here: cppreference.com

For this particular usage, I think the useful functions are down near the bottom: strtok() and its friends.