IntToStr() function returns string which is Unicode now. I want to convert to AnsiString.
Can I use AnsiString(IntToStr(I)) safely?
2 Answers
Sure. Or you can use IntToAnsiString (written by Dr. Bob):
function IntToAnsiStr(X: Integer; Width: Integer = 0): AnsiString;
begin
Str(X: Width, Result);
end;