Search results

There are no results.

std.int.Format

class pub enum Format

The 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 code
Hide source code
fn pub to_base -> Int {
  match self {
    case Binary -> 2
    case Decimal -> 10
    case Hex -> 16
  }
}
fn pub to_base -> Int