On Mon, 28 Jan 2019, a...@aavani.net wrote:
Hi,
I am looking for a version of Format function that works with
WideStrings. One way to implement this is to use something like the
folllowing:
function GetNames(const FirstName, LastName: WideString; ID: Integer):
WideString;
begin
Result := ReadWideString(Format('%d %s %s', [ID,
WideStringToUTF8(Name1), WideStringToUTF8(Name2)])
end;
Is there any better way to do this?
You can use the native functions:
https://www.freepascal.org/docs-html/current/rtl/sysutils/wideformat.html
https://www.freepascal.org/docs-html/current/rtl/sysutils/unicodeformat.html
Michael.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel