[fpc-pascal] TStringHelper missing

Sven Barth pascaldragon at googlemail.com
Mon Aug 21 13:52:29 CEST 2017


Am 21.08.2017 13:51 schrieb "Sven Barth" <pascaldragon at googlemail.com>:
>
> Am 21.08.2017 08:23 schrieb "Michael Van Canneyt" <michael at freepascal.org
>:
> >
> >
> >
> > On Mon, 21 Aug 2017, Ryan Joseph wrote:
> >
> >> I’m trying to split a string by a delimiter and see there is a type
helper called TStringHelper (
https://www.freepascal.org/docs-html/rtl/sysutils/tstringhelper.html). The
compiler version I’m using is "Free Pascal Compiler version 3.1.1
[2017/04/22] for i386” but when I include SysUtils the methods are not
found.
> >>
> >> For example:
> >>
> >> var
> >>  str: string;
> >>  parts: TStringArray;
> >>
> >> parts := str.Split(' ‘);
> >>
> >>
> >> What am I doing wrong?
> >
> >
> > Try
> >
> > var
> >   Str : AnsiString;
> > or
> >   Str : WideString;
> >
> > I believe the compiler has some trouble finding the helper if you use
the
> > 'string' alias. I think there is even a bugreport about it.
> > Sven Barth can confirm/deny this.
>
> I thought that was fixed? Except of course if $H- is used (which is the
default in all modes except the Delphi ones) cause then String = AnsiString.

String = ShortString in case of $H- of course -.-

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170821/df9e6a57/attachment.html>


More information about the fpc-pascal mailing list