[fpc-devel] Zero terminated strings

ABorka fpc-devel at aborka.com
Tue Nov 11 03:07:39 CET 2008


Are strings not zero terminated? I have a function declared:

function myfunc(s :String; i: Integer):String;

When going through the string "s" with asm instructions, it does not 
seem to have a zero byte at the end. Is this normal or something is not 
OK (maybe now with utf8 strings as defaults it is not there any longer)?

I got around this by doing a StrPCopy into a buffer of bytes, so just 

Thanks for any feedback

More information about the fpc-devel mailing list