Check if last character of string is line ending? lazarus / 61-Beginners ---------------------------------------------------------------------- Trenatos · 2015-08-17 19:56 Since I'm working with streams, there are no guarantees that the last character of a specific line is a line ending. Is there a way to check if the last character is a line ending? ---------------------------------------------------------------------- User137 · 2015-08-17 20:58 How are you using the streams? Usual line change is combination of 2 characters: #13#10, also known as CRLF http://wiki.lazarus.freepascal.org/End_of_Line But with streams you shouldn't need to know that, since length can be known before reading the string itself. ---------------------------------------------------------------------- Basile B. · 2015-08-18 04:16 Quote from: Trenatos on August 17, 2015, 09:56:36 pmSince I'm working with streams, there are no guarantees that the last character of a specific line is a line ending. Is there a way to check if the last character is a line ending? By chance, do you ask this because of TProcess.Output ? ---------------------------------------------------------------------- Trenatos · 2015-08-18 13:32 Yes. But the problem has been solved by a piece of code I accidentally remove in an earlier bughunt.