StrMustResize
Description
Aborting variant of StrResize: resize the string to len characters, aborting on allocation failure. See VecMustResize for the full SUCCESS/FAILURE contract.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Resolve.c:51:
Zstr p = StrBegin(&s);
if (n >= 2 && p[n - 1] == '0' && p[n - 2] == ':') {
StrMustResize(&s, n - 2);
}
WriteFmtLn("{}", s);
Last updated on