<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Hi there,<br>
<br>
I was looking for a native implementation for JoinStrings and
ended up in <a
href="https://wiki.freepascal.org/TStringList-TStrings_Tutorial"
moz-do-not-send="true">TStringList-TStrings_Tutorial</a>.<br>
<br>
<br>
<a href="https://wiki.freepascal.org/TStringList-TStrings_Tutorial"
moz-do-not-send="true"></a><br>
In <a moz-do-not-send="true"
href="https://wiki.freepascal.org/TStringList-TStrings_Tutorial#Conversion_to_and_from_delimited_strings">Conversion
to and from delimited strings</a> section, it claims the following
code works if the separator is a string:<br>
MyStringList:= TStringList.create;<br>
MyStringList.SkipLastLineBreak := True;<br>
MyStringList.add('1');<br>
MyStringList.add('2');<br>
MyStringList.add('3');<br>
result := StringReplace(MyStringList.Text,Lineending,'\n',
[rfReplaceAll, rfIgnoreCase]);<br>
<br>
I believe this is not correct. What if there is a
newline(LineEnding) in one of the strings? <br>
<br>
Best,<br>
Amir<br>
<br>
<br>
<br>
</body>
</html>