std.int.Format
Valuetype pub copy enum FormatThe format to use for parsing and formatting an Int.
Constructors
Binary
Binary()The Int is to be parsed or formatted as a binary number.
Decimal
Decimal()The Int is to be parsed or formatted as a decimal number.
Hex
Hex()The Int is to be parsed or formatted as a hexadecimal number.
Instance methods
to_base
Show source codeHide source code
fn pub inline to_base -> Int {
match self {
case Binary -> 2
case Decimal -> 10
case Hex -> 16
}
}fn pub inline to_base -> Int