Concat lines in a listbox

I need to concat all the lines in a listbox (except the last line) into a string. Something like:

First line
Second line
Third line
Fourth line

into "First line Second line Third line"

The problem is that the number of lines in the listbox would vary and I do not know beforehand how many there are.

Any help would be greatly appreciated.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!