IntFromOctStr
Description
Compatibility wrapper for IntTryFromOctStr(...).
Success
Returns Parsed integer value, or zero on failure.
Failure
Returns a zero-initialised Int on a non-octal character, an empty digit run, or an allocation failure. Use IntTryFromOctStr(...) when explicit failure propagation is required.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Convert.c:305:
DefaultAllocator alloc = DefaultAllocatorInit();
Int value = IntFromOctStr("0o7_55", ALLOCATOR_OF(&alloc));
Str text = IntToOctStr(&value);- In
Convert.c:528:
bool test_int_from_octal_null(void) {
WriteFmt("Testing IntFromOctStr NULL handling\n");
DefaultAllocator alloc = DefaultAllocatorInit();- In
Convert.c:532:
DefaultAllocator alloc = DefaultAllocatorInit();
IntFromOctStr((Zstr)NULL, ALLOCATOR_OF(&alloc));
DefaultAllocatorDeinit(&alloc);
return false;
Last updated on