Procedure SetString(var S : String; Buf : PChar; Len : Longint);
Description:
SetString sets the length of the string S to Len and if Buf is non-nil, copies Len characters
from Buf into S. S can be an ansistring, a short string or a widestring. For ShortStrings,
Len can maximally be 255.