Is passing a (Unicode) string to a WideString parameter safe?

238 Views Asked by At

Is it safe to pass a Delphi (Unicode) string to a procedure as a parameter of type WideString?

procedure Test;
var
  S: string;
  Html: string;
begin
  S := '...'; // may contain anything a Unicode string accepts
  Html := WideStringToHTML(S);
end;

function WideStringToHTML(const AParam: WideString): string;
begin
  ...
end;
0

There are 0 best solutions below