...or I guess more specifically, can I require that input from STDIN (or closest alternative, e.g. TIO) be newline terminated?
Utilising apps like TIO this isn't added, but if using a terminal with <<<
a newline is appended, it can only be omitted using something like echo -n ... | script
. I've definitely used either as it suits me, but I don't know if that's appropriate or not.
A specific example of this is my answer to this question which could save two bytes assuming a newline exists on the input, but would necessitate TIO having an explicit terminating newline.
This has an answer in the I/O defaults
Thanks to @Bubbler for clarifying.
My read on this is that you may specify either way as your answer requires.
<input string><newline>
for your program). \$\endgroup\$