Sovled Detect Line Ending in String lazarus / 21-General ---------------------------------------------------------------------- DreamVB · 2023-07-12 19:04 hi, is there a function in Lazarus that I can find the line-ending of a string that been retunred from a TSynEdit, I like it to return LF for Unix, CR for Mac or crlf for Windows I looked around and can't find anything. I like to use the code in a editor I am making to save to different OS formats. if anyone can help I be very grateful thanks. ---------------------------------------------------------------------- KodeZwerg · 2023-07-12 19:13 I do not understand what you write. SynEdit, or other Edit controls are using TStrings to store their lines into, so just iterate over and add whatever you want. ---------------------------------------------------------------------- TRon · 2023-07-12 19:33 As stated by KodeZwerg, tsynedit is using TStrings for storing the lines of text. You can however change the linebreak style for reading/writing strings by using the property LineBreak. Only use that if you are certain you want to do that as the components automatically takes care of using the correct line ending based on what platform tsynedit is running. ---------------------------------------------------------------------- DreamVB · 2023-07-12 19:47 Hi Thanks for your help I read from the TStrings and mae a buffer of each line an adding my line-ending and writing it to a file and seems to work. Thanks both for the help