src/intobject/ops_tostr

Source   Edit  

Procs

proc format(i: IntObject; base: uint8; s: var string): bool {....raises: [],
    tags: [], forbids: [].}
_PyLong_Format s is a out param
Note: base must be either 10 or a power of 2 less than 64
Source   Edit  
proc format_binary(a: IntObject; base: uint8; alternate: bool; v: var string): bool {.
    ...raises: [], tags: [], forbids: [].}

long_format_binary

returns if not overflow

Source   Edit  
proc toString(i: IntObject; base: BaseRngT): string {....raises: [], tags: [],
    forbids: [].}
unlike toStringCheckThreshold , this does not check get_intobject_state().max_str_digits Source   Edit  
proc toStringCheckThreshold(a: IntObject; v: var string): bool {....raises: [],
    tags: [], forbids: [].}

this respects get_intobject_state().max_str_digits

returns if exceeds threshold, but does not raise, instead returns false

Source   Edit