Skip to content

IntToOctStr

IntToOctStr

Description

Convert an integer to an octal string.

Parameters

Name Direction Description
value in Integer to convert

Usage example (from documentation)

  Str text = IntToOctStr(&value);

Returns

Base-8 representation without a prefix.

Usage example (Cross-references)

Usage examples (Cross-references)
    }
    
    Str IntToOctStr(Int *value) {
        return IntToStrRadix(value, 8, false);
    }
    
        Int value = IntFromOctStr("0o7_55");
        Str text  = IntToOctStr(&value);
    
        bool result = IntToU64(&value) == 493;
        z = "755";
        StrReadFmt(z, "{o}", oct);
        oct_text = IntToOctStr(&oct);
        success  = success && (ZstrCompare(oct_text.data, "755") == 0);
Last updated on