if (HTMLString[i] <> '\n')
Code: [Select]if (HTMLString[i] <> '\n')Htmlstring\[i\] is one char. '\n' is two, so they are never equal ?Maybe you try something else than a backslash and an n?
stringlist already breaks on line ends just doCode: Pascal [Select][+][-]varHTMLString: WideString;i:integerfList:TStringList;begin fList := TStringList.Create(); fList.Text := HTMLString;end; that should give you multiple lines. as far as I know there is no escape character support in string in pascal you have to define your character by code I suggest to use #10 it will always break correctly the lines regardless of line end format.
Quote from: marcov on April 25, 2018, 04:16:28 pmCode: [Select]if (HTMLString[i] <> '\n')Htmlstring\[i\] is one char. '\n' is two, so they are never equal ?Maybe you try something else than a backslash and an n?End of line always \r\n or #10#13. I don't know what it should be here.