StrWriteFmt
Description
Write a formatted string to out from scratch. Equivalent to StrClear(out) followed by StrAppendFmt(out, ...) – any prior contents of out are discarded.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Io.Write.c:772:
Str s = StrInit(&alloc);
StrAppendFmt(&s, "old prefix ");
StrWriteFmt(&s, "fresh {}", LVAL(42));
bool ok = (s.length == 8) && (s.data[0] == 'f') && (s.data[s.length - 1] == '2');
StrDeinit(&s);
Last updated on