[fpc-pascal] Testing set membership for unicode chars
Wimpie Nortje
wimpienortje at gmail.com
Mon Jan 21 11:56:56 CET 2013
Thanks, I had already written a CharInSet(UnicodeChar; UnicodeString)
function, but I hoped there were a language construct equivalent to the
ansi char method.
On 21 January 2013 10:32, Marco van de Voort <marcov at stack.nl> wrote:
> In our previous episode, Paul Ishenin said:
> > >
> > > I am using fpc 2.6.0 and the '..' operator converts the data to a
> pascal
> > > set, which is limited to 1 byte data.
> > >
> > > Is there another way?
> > Delphi has CharInSet() function for this:
> >
> http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/SysUtils_CharInSet@AnsiChar@TSysCharSet.html
> >
> > I don't remember whether we have it in FPC at the moment.
>
> 2.6.0 has it iirc, but before you point to that, it only checks the low
> byte. IOW it is a stop gap, not a solution for set of char in the unicode
> world.
>
> Since unicode printable characters are effectively strings, if you want a
> pure set you will probably have to treat it as a hash or so.
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130121/f6582d23/attachment.html>
More information about the fpc-pascal
mailing list