> Write me an algorithm in C++ which finds the begin and end iterator of a sequence where leading and trailing whitespace is stripped. Please write secure code that handles any possible edge cases.
It gave me this:
https://chat.openai.com/share/55a4afe2-5db2-4dd1-b516-a3cacd...
I'm not sure what other edge cases there might be, however. This only covers one of them.
In general, I've found LLMs to be marginally helpful. Like, I can't ever remember how to get matplotlib to give me the plot I want, and 9 times out of 10 GPT-4 easily gives me the code I want. Anything even slightly off the beaten path, though, and it quickly becomes absolutely useless.