On 21 August 2012 14:54, Marco van de Voort <mar...@stack.nl> wrote:
>
> Doesn't sound wise.  length(stringtype)=n should mean that the string takes
> sizeof(char)*n bytes. (give or take the #0#0)


I'm not sure what you are trying to accomplish? Give me sample code
that will cause a problem.

In fpGUI I have UTF8Length(mystring) which returns the actual number
of code points used - not bytes used. If you want the number of bytes
used, simply use Length(mystring).  Use each of those at appropriate
times based on what you want to accomplish.

The RTL Length() function has been the source of lots of confusion to
Delphi and FPC developers. So without an actual use-case I don't know
what you are trying to do.


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to