Operations and constants for u64
max_value
min_value
eq
ord
- Interfaces used for comparison.eq of eq for T
num of num::num for T
ord of ord for T
times of iter::times for T
add
compl
- Computes the bitwise complementdiv
eq
from_str
- Parse a string to an intfrom_str_radix
- Parse a string as an unsigned integer.ge
gt
is_negative
is_nonnegative
is_nonpositive
is_positive
le
lt
max
min
mul
ne
parse_buf
- Parse a buffer of bytesrange
- Iterate over the range [lo
..hi
)rem
str
- Convert to a stringsub
to_str
- Convert to a string in a given baseto_str_bytes
- Low-level helper routine for string conversion.max_value
T
min_value
T
eq
eq
fn eq(&&other: self) -> bool
ord
Interfaces used for comparison.
lt
fn lt(&&other: self) -> bool
eq of eq for T
eq
fn eq(&&other: T) -> bool
num of num::num for T
add
fn add(&&other: T) -> T
sub
fn sub(&&other: T) -> T
mul
fn mul(&&other: T) -> T
div
fn div(&&other: T) -> T
modulo
fn modulo(&&other: T) -> T
neg
fn neg() -> T
to_int
fn to_int() -> int
from_int
fn from_int(n: int) -> T
ord of ord for T
lt
fn lt(&&other: T) -> bool
times of iter::times for T
times
fn times(it: fn() -> bool)
A convenience form for basic iteration. Given a variable x
of any numeric type, the expression for x.times { /* anything */ }
will execute the given function exactly x times. If we assume that x
is an int, this is functionally equivalent to for int::range(0, x) |_i| { /* anything */ }
.
add
pure fn add(&&x: T, &&y: T) -> T
compl
pure fn compl(i: T) -> T
Computes the bitwise complement
div
pure fn div(&&x: T, &&y: T) -> T
eq
pure fn eq(&&x: T, &&y: T) -> bool
from_str
fn from_str(s: str) -> option<T>
Parse a string to an int
from_str_radix
fn from_str_radix(buf: str, radix: u64) -> option<u64>
Parse a string as an unsigned integer.
ge
pure fn ge(&&x: T, &&y: T) -> bool
gt
pure fn gt(&&x: T, &&y: T) -> bool
is_negative
pure fn is_negative(x: T) -> bool
is_nonnegative
pure fn is_nonnegative(x: T) -> bool
is_nonpositive
pure fn is_nonpositive(x: T) -> bool
is_positive
pure fn is_positive(x: T) -> bool
le
pure fn le(&&x: T, &&y: T) -> bool
lt
pure fn lt(&&x: T, &&y: T) -> bool
max
pure fn max(&&x: T, &&y: T) -> T
min
pure fn min(&&x: T, &&y: T) -> T
mul
pure fn mul(&&x: T, &&y: T) -> T
ne
pure fn ne(&&x: T, &&y: T) -> bool
parse_buf
fn parse_buf(buf: ~[u8], radix: uint) -> option<T>
Parse a buffer of bytes
buf
must not be empty
range
fn range(lo: T, hi: T, it: fn(T) -> bool)
Iterate over the range [lo
..hi
)
rem
pure fn rem(&&x: T, &&y: T) -> T
str
fn str(i: T) -> str
Convert to a string
sub
pure fn sub(&&x: T, &&y: T) -> T
to_str
fn to_str(num: T, radix: uint) -> str
Convert to a string in a given base
Fails if radix
< 2 or radix
> 16
to_str_bytes
fn to_str_bytes<U>(neg: bool, num: T, radix: uint, f: fn(v: & [u8]) -> U) -> U
Low-level helper routine for string conversion.