Re: [fpc-pascal] Split and Join

2009-11-27 Thread Luca Olivetti
En/na Michael Van Canneyt ha escrit: Of course it does exist. Split can be implemented like this: List:=TStringList.Create; List.Delimiter:=Delim; List.StrictDelimiters:=True; List.DelimitedText:=Str; Never though of it. And join can be done too. Pity that delimiter is a single character. e

Re: [fpc-pascal] Split and Join

2009-11-27 Thread Michael Van Canneyt
On Fri, 27 Nov 2009, Mattias Gaertner wrote: On Fri, 27 Nov 2009 20:11:25 +0100 (CET) Michael Van Canneyt wrote: On Fri, 27 Nov 2009, Juha Manninen wrote: Hi, FPC's strutils or other libraries still don't have functions for splitting a string to a list and joining a list of strings aga

Re: [fpc-pascal] Split and Join

2009-11-27 Thread Mattias Gaertner
On Fri, 27 Nov 2009 20:11:25 +0100 (CET) Michael Van Canneyt wrote: > > > On Fri, 27 Nov 2009, Juha Manninen wrote: > > > Hi, > > > > FPC's strutils or other libraries still don't have functions for splitting a > > string to a list and joining a list of strings again to one string, given a > >

Re: [fpc-pascal] Split and Join

2009-11-27 Thread Michael Van Canneyt
On Fri, 27 Nov 2009, Juha Manninen wrote: Hi, FPC's strutils or other libraries still don't have functions for splitting a string to a list and joining a list of strings again to one string, given a delimiter as a parameter. Something like: function Spit(Str: string; Delim: string; Result: T

Re: [fpc-pascal] Split and Join

2009-11-27 Thread Juha Manninen
Hi, I can actually use TStringList's Delimiter and DelimitedText for basic splitting. This separates words of a text: List.Delimiter := ' '; List.DelimitedText := S; I have programmed with Delphi for years without knowing it. Now I found it with a google search. Should have waited a little