I have a list of strings stored in TStringList, i want to convert it into string seperated by commas and i use the following code
channelList: TStringList;
aCurrentChannel := Stringreplace(channelList.Text,Char(13)+Char(10),',',[rfReplaceAll]);
but the last character is coming as , like 1,2, is there anyway to avoid that?
CommaText
property, but usingTrim()
should fix your original solution ieStringReplace(Trim(sl.Text), ...)
– Lush