IntTryToStr
Description
Convert an integer to a decimal string. Two forms via argument count:
IntTryToStr(out, value)- usesvalue’s allocator.IntTryToStr(out, value, alloc)- uses the explicit allocator.
Success
Returns true; *out holds the base-10 textual form of value (leading - when negative, "0" for zero).
Failure
Returns false when an intermediate allocation fails; *out is left initialized as an empty Str on alloc.
Usage example (Cross-references)
Usage examples (Cross-references)
bool test_int_try_to_str_allocator_inheritance(void) {
WriteFmt("Testing IntTryToStr allocator behavior\n");
DefaultAllocator alloc = DefaultAllocatorInit();
Last updated on