Is there any standard C++ function for generating a substr up until a new-line char?
I was wondering if there is any standard C++ function for generating a substring up until the first '\n' character read in a source string passed to the function, after a position specified in the string? If not, I guess I'll have to write my own.
I noticed that the string::substr() function only allows you to pass a starting pos, and the length, and the substring generated will include any new-line characters it encounters before the end of length, and I can't have that, so that's why I'm looking for an alternative function to do what I specified above.