struct UVarInt

Defined in:

uvarint.cr

Constructors

Class Method Summary

Instance Method Summary

Macro Summary

Constructor Detail

def self.new(int : Int::Unsigned) #

[View source]
def self.new(int : BigInt) #

[View source]
def self.new(bytes : Bytes) #

[View source]
def self.new(en : Enumerable(UInt8)) #

[View source]
def self.new(str : String) #

[View source]

Class Method Detail

def self.parse(str : String) #

[View source]
def self.read(str : String) #

[View source]
def self.read(io : IO) #

[View source]
def self.read(iter : Iterator(UInt8)) #

[View source]

Instance Method Detail

def %(other : UVarInt) : UVarInt #

for the following operators, define a method that performs that mathematical operation on both operands' int values, and returns a new UVarInt with the new value


[View source]
def &(other : UVarInt) : UVarInt #

[View source]
def *(other : UVarInt) : UVarInt #

[View source]
def **(other : UVarInt) : UVarInt #

[View source]
def +(other : UVarInt) : UVarInt #

[View source]
def -(other : UVarInt) : UVarInt #

[View source]
def /(other : UVarInt) : UVarInt #

[View source]
def <(other : UVarInt) #

for the following operators, define a method that performs the logical operation on both operands' int values, and returns a boolean value


[View source]
def <<(other : UVarInt) : UVarInt #

[View source]
def <=(other : UVarInt) #

[View source]
def <=>(other : UVarInt) #

[View source]
def ==(other : UVarInt) #

[View source]
def >(other : UVarInt) #

[View source]
def >=(other : UVarInt) #

[View source]
def >>(other : UVarInt) : UVarInt #

[View source]
def ^(other : UVarInt) : UVarInt #

[View source]
def bytes : Slice(UInt8) #

[View source]
def hexstring #

[View source]
def to_big_i : BigInt #

[View source]
def to_f : Float64 #

Returns self converted to Float64.


[View source]
def to_f32 : Float32 #

Returns self converted to Float32.


[View source]
def to_f64 : Float64 #

Returns self converted to Float64.


[View source]
def to_i : Int32 #

for the following name-type pairs, define a method that is mapped to the method of the same name on the internal BigInt value Returns self converted to Int32.


[View source]
def to_i16 : Int16 #

Returns self converted to Int16.


[View source]
def to_i32 : Int32 #

Returns self converted to Int32.


[View source]
def to_i64 : Int64 #

Returns self converted to Int64.


[View source]
def to_i8 : Int8 #

Returns self converted to Int8.


[View source]
def to_s(base : Int32) #

[View source]
def to_u : UInt32 #

Returns self converted to UInt32.


[View source]
def to_u16 : UInt16 #

Returns self converted to UInt16.


[View source]
def to_u32 : UInt32 #

Returns self converted to UInt32.


[View source]
def to_u64 : UInt64 #

Returns self converted to UInt64.


[View source]
def to_u8 : UInt8 #

Returns self converted to UInt8.


[View source]

Macro Detail

macro [](*args) #

[View source]