Functions for operating on the lines of a string.
Note that these functions generally work with Unix-style newline
characters, i.e.,
One option for treating a string as lines is to just use, e.g., strtok to literally split it into a list of lines. The functions here are generally meant to be more efficient, e.g., prefix-lines can add a prefix to every line without constructing an temporary string list or doing any intermediate string concatenation.