STRFORM

Format

STRFORM( format [ , arg ... ] )

Function

Arguments

format
Format string.
arg
Format string argument.

Return value

Related

Version

Example

The following is a comparison with sprintf. It can be used exactly the same way, except that the result is obtained as a return value, and the prefix character for formatting is $.

// C language
int year = 1941;
char *warname = "pacific";
sprintf(str, "%04d - outbreak of the %s war.", year, warname);
// AYA
year = 1941
warname = "pacific"
str = STRFORM("$04d - outbreak of the $s war.", year, warname)

The length of a string that can be expanded per format specification is limited to 1024 characters.