On Mon, Nov 24, 2008 at 3:55 PM, Jeff Wormsley <[EMAIL PROTECTED]> wrote: > such as SetLength, Length, stringvar[index], copy(string, index, count), pos > etc. cannot work 100% reliably. You don't know what the programmer wants > when he says stringvar[3]. Does he mean the third character in the string? > Or the third byte in the memory array represented by the string (perhaps he > was using a string as a buffer)?
That is why I currently use CharAt(str, i) in my projects and fpGUI - instead of direct array access. CharAt() handles ANSI and UTF-8 strings perfectly. Yes it might be slower, but I hardly ever need character access for the type of applications I am writing. So using CharAt() once or twice in my application is not a performance problem. Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel