I need a scanf() call to accept whitespace (no tabs or newlines, just ' '
space glyphs).
char buffer[2048];
scanf(" %2048[0-9a-zA-Z ]s", buffer);
This format specifier I got from the answer to this question:
how-do-you-allow-spaces-to-be-entered-using-scanf
While it accepts the first sequence of input just fine, it terminates where the first whitespace character is, with a null character. What's going on? Am I perhaps using the wrong format?
I should say, I'm using scanf() here because safety isn't a concern; I'm the only person who'll ever use this particular program, and the input is rigidly formatted.