[fpc-devel] Addtions for strutils
Marco van de Voort
marcov at stack.nl
Sat Jan 21 17:06:10 CET 2006
> I wish to add 3 new string functions for strutils:
> 1. Check if a string is an integer (without + or - signs).
Hmm, is this not a bit overspecialisation ?
val(x,code);
result:=(code=0) and (posexset(['+','-'],x)=0)
would already do. (untested from memory)
> 2. split a string into an array using a giving separator.
In some form already exists. (e.g. tstringlist) however that has some
limitations.
However so has yours:
- separator aggregates are not supported.
- there is too much copy() ing going on.
I do agree however that such function, without tstringlists limitations is
needed, but we need something more general I think.
More information about the fpc-devel
mailing list