@sprintf macro (based on the $$sprintf builtin) allows compile time format strings #1874.

This commit is contained in:
Christoffer Lerno
2025-06-06 03:18:28 +02:00
parent 9baeca3a8e
commit f2daf2e11e
17 changed files with 168 additions and 69 deletions

View File

@@ -78,6 +78,10 @@ macro Char16[] @char16(String $string) @builtin
return $$wstr16($string)[..^2];
}
macro String @sprintf(String $format, ...) @builtin @const
{
return $$sprintf($format, $vasplat);
}
<*
Return a temporary ZString created using the formatting function.