[fpc-pascal] splitting string into array
Michael Van Canneyt
michael at freepascal.org
Wed Jul 11 12:03:32 CEST 2007
On Wed, 11 Jul 2007, L wrote:
> Marc Santhoff wrote:
> > Hi,
> >
> > is there any function in the libraries of fpc for splitting a string
> > into an array naming the separator?
>
> There is a function in the substrings.pas unit included in this
> package:
>
> http://z505.com/cgi-bin/powtils/docs/1.6/idx.cgi?file=substrsplit&unit=substrings
>
> And some other goodies in the substrings unit, and also some more goodies in
> strfilter.pas, and strwrap1.pas.
>
> Many functions should be merged into an FPC rtl unit I suppose, since it appears
> many of us are reinventing the wheel each time rolling our own private units.
There are such units: strutils, math, dateutils.
I think there is room for a few more:
fileutils (file/disk related),
osutils (getting os-specific data, versions and the like)
classutils: additional functionality on top of the classes unit.
Feel free to make proposals. I guess the main problem will be the interface
and error reporting: each has his own way of doing things, which others
do not like or would do differently...
Michael.
More information about the fpc-pascal
mailing list