and:
function LeftStr(const S: string; Count: integer): string;
begin
result := Copy(S, 1, Count);
end ;
Since Count is 1, why would it copy 2 on your side?
I don't know, since it's not so easy to follow
Copy() to the used implementation; all I know is that here it shows "2" ... maybe a difference in source encoding? But note that both are described in the docs as copyig
characters. Anyway, no harm in using the corresponding
UTF8xxx functions.
ETA: Well, hell:
Copy is a built-in, like
WriteLn,
SetLength and a long etc. Who knows what it really does!