IntFromOctStr
IntFromOctStr
Description
Parse an octal string into an integer. Accepts an optional 0o or 0O prefix.
Parameters
| Name | Direction | Description |
|---|---|---|
octal |
in | Octal digit string |
Usage example (from documentation)
Int value = IntFromOctStr("0o755");Returns
Parsed integer value.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Int.c:563:
}
Int IntFromOctStr(const char *octal) {
if (!octal) {
LOG_FATAL("octal is NULL"); WriteFmt("Testing Int octal round trip\n");
Int value = IntFromOctStr("0o7_55");
Str text = IntToOctStr(&value);
bool test_int_from_octal_null(void) {
WriteFmt("Testing IntFromOctStr NULL handling\n");
IntFromOctStr(NULL); WriteFmt("Testing IntFromOctStr NULL handling\n");
IntFromOctStr(NULL);
return false;
}
Last updated on