Original Post
I've got a file that can be either DOS or Unix text (so \r\n or \n delimiter depending on where it was created). I want to use std::getline(infile, string) but I can't figure out an easy way to not be bothered with differing EOL characters. Right now the \r isn't being stripped out as an EOL (since \n is the only delimiter std::getline() looks for). Is the best thing to check for the \r and remove it if it's there, or is there a cleaner way to get it done while still removing the \n?