mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
@sprintf macro (based on the $$sprintf builtin) allows compile time format strings #1874.
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user