Is it possible to have line breaks in an ini file using Delphi?
I have a string value that I’d like to use, but it needs to have the ability for line breaks. I don’t need any other formatting of the text.
How can I do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s been a while since I did Delphi, but I think you can’t directly include linefeeds – a line is a line.
But as Örjan says, you can include characters in your string that can be interpreted by your program as line breaks.
I doubt that “\n” is automatically treated specially in any way in a .ini file, but you could include some other rarely used character, such as the pipe (|) or tilde (~) and just let your app translate that to a line break.