[fpc-devel] Format Function

Michael Van Canneyt michael at freepascal.org
Tue Jan 29 10:36:45 CET 2019

On Mon, 28 Jan 2019, Amir at 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:



More information about the fpc-devel mailing list