Skip to content

struct UInt32
inherits Int

Constants

MAX = 4294967295_u32

MIN = 0_u32

Class methods

.from_json_object_key?(key : String)

View source

.new!(value)

Returns an UInt32 by invoking to_u32! on value.

View source

.new(value)

Returns an UInt32 by invoking to_u32 on value.

View source

Methods

#!=(other : Int32) : Bool

Returns true if self is not equal to other.

View source

#!=(other : Float64) : Bool

Returns true if self is not equal to other.

View source

#!=(other : Float32) : Bool

Returns true if self is not equal to other.

View source

#!=(other : UInt128) : Bool

Returns true if self is not equal to other.

View source

#!=(other : UInt64) : Bool

Returns true if self is not equal to other.

View source

#!=(other : UInt32) : Bool

Returns true if self is not equal to other.

View source

#!=(other : UInt16) : Bool

Returns true if self is not equal to other.

View source

#!=(other : UInt8) : Bool

Returns true if self is not equal to other.

View source

#!=(other : Int128) : Bool

Returns true if self is not equal to other.

View source

#!=(other : Int64) : Bool

Returns true if self is not equal to other.

View source

#!=(other : Int16) : Bool

Returns true if self is not equal to other.

View source

#!=(other : Int8) : Bool

Returns true if self is not equal to other.

View source

#&(other : Int16) : self

Returns the result of performing a bitwise AND of self's and other's bits.

View source

#&(other : Int32) : self

Returns the result of performing a bitwise AND of self's and other's bits.

View source

#&(other : Int64) : self

Returns the result of performing a bitwise AND of self's and other's bits.

View source

#&(other : UInt128) : self

Returns the result of performing a bitwise AND of self's and other's bits.

View source

#&(other : UInt64) : self

Returns the result of performing a bitwise AND of self's and other's bits.

View source

#&(other : UInt32) : self

Returns the result of performing a bitwise AND of self's and other's bits.

View source

#&(other : UInt16) : self

Returns the result of performing a bitwise AND of self's and other's bits.

View source

#&(other : Int128) : self

Returns the result of performing a bitwise AND of self's and other's bits.

View source

#&(other : Int8) : self

Returns the result of performing a bitwise AND of self's and other's bits.

View source

#&(other : UInt8) : self

Returns the result of performing a bitwise AND of self's and other's bits.

View source

#&*(other : UInt128) : self

Returns the result of multiplying self and other. In case of overflow a wrapping is performed.

View source

#&*(other : UInt64) : self

Returns the result of multiplying self and other. In case of overflow a wrapping is performed.

View source

#&*(other : UInt32) : self

Returns the result of multiplying self and other. In case of overflow a wrapping is performed.

View source

#&*(other : UInt16) : self

Returns the result of multiplying self and other. In case of overflow a wrapping is performed.

View source

#&*(other : UInt8) : self

Returns the result of multiplying self and other. In case of overflow a wrapping is performed.

View source

#&*(other : Int32) : self

Returns the result of multiplying self and other. In case of overflow a wrapping is performed.

View source

#&*(other : Int64) : self

Returns the result of multiplying self and other. In case of overflow a wrapping is performed.

View source

#&*(other : Int16) : self

Returns the result of multiplying self and other. In case of overflow a wrapping is performed.

View source

#&*(other : Int8) : self

Returns the result of multiplying self and other. In case of overflow a wrapping is performed.

View source

#&*(other : Int128) : self

Returns the result of multiplying self and other. In case of overflow a wrapping is performed.

View source

#&+(other : UInt16) : self

Returns the result of adding self and other. In case of overflow a wrapping is performed.

View source

#&+(other : UInt8) : self

Returns the result of adding self and other. In case of overflow a wrapping is performed.

View source

#&+(other : Int128) : self

Returns the result of adding self and other. In case of overflow a wrapping is performed.

View source

#&+(other : UInt32) : self

Returns the result of adding self and other. In case of overflow a wrapping is performed.

View source

#&+(other : UInt64) : self

Returns the result of adding self and other. In case of overflow a wrapping is performed.

View source

#&+(other : UInt128) : self

Returns the result of adding self and other. In case of overflow a wrapping is performed.

View source

#&+(other : Int8) : self

Returns the result of adding self and other. In case of overflow a wrapping is performed.

View source

#&+(other : Int16) : self

Returns the result of adding self and other. In case of overflow a wrapping is performed.

View source

#&+(other : Int32) : self

Returns the result of adding self and other. In case of overflow a wrapping is performed.

View source

#&+(other : Int64) : self

Returns the result of adding self and other. In case of overflow a wrapping is performed.

View source

#&-(other : Int8) : self

Returns the result of subtracting self and other. In case of overflow a wrapping is performed.

View source

#&-(other : Int16) : self

Returns the result of subtracting self and other. In case of overflow a wrapping is performed.

View source

#&-(other : Int32) : self

Returns the result of subtracting self and other. In case of overflow a wrapping is performed.

View source

#&-(other : Int64) : self

Returns the result of subtracting self and other. In case of overflow a wrapping is performed.

View source

#&-(other : UInt128) : self

Returns the result of subtracting self and other. In case of overflow a wrapping is performed.

View source

#&-(other : Int128) : self

Returns the result of subtracting self and other. In case of overflow a wrapping is performed.

View source

#&-(other : UInt64) : self

Returns the result of subtracting self and other. In case of overflow a wrapping is performed.

View source

#&-(other : UInt32) : self

Returns the result of subtracting self and other. In case of overflow a wrapping is performed.

View source

#&-(other : UInt16) : self

Returns the result of subtracting self and other. In case of overflow a wrapping is performed.

View source

#&-(other : UInt8) : self

Returns the result of subtracting self and other. In case of overflow a wrapping is performed.

View source

#*(other : Int8) : self

Returns the result of multiplying self and other. Raises OverflowError in case of overflow.

View source

#*(other : Int16) : self

Returns the result of multiplying self and other. Raises OverflowError in case of overflow.

View source

#*(other : Int32) : self

Returns the result of multiplying self and other. Raises OverflowError in case of overflow.

View source

#*(other : Int64) : self

Returns the result of multiplying self and other. Raises OverflowError in case of overflow.

View source

#*(other : Int128) : self

Returns the result of multiplying self and other. Raises OverflowError in case of overflow.

View source

#*(other : UInt8) : self

Returns the result of multiplying self and other. Raises OverflowError in case of overflow.

View source

#*(other : UInt16) : self

Returns the result of multiplying self and other. Raises OverflowError in case of overflow.

View source

#*(other : UInt32) : self

Returns the result of multiplying self and other. Raises OverflowError in case of overflow.

View source

#*(other : UInt64) : self

Returns the result of multiplying self and other. Raises OverflowError in case of overflow.

View source

#*(other : UInt128) : self

Returns the result of multiplying self and other. Raises OverflowError in case of overflow.

View source

#*(other : Float64) : Float64

Returns the result of multiplying self and other.

View source

#*(other : Float32) : Float32

Returns the result of multiplying self and other.

View source

#+(other : UInt128) : self

Returns the result of adding self and other. Raises OverflowError in case of overflow.

View source

#+(other : Int128) : self

Returns the result of adding self and other. Raises OverflowError in case of overflow.

View source

#+(other : Int64) : self

Returns the result of adding self and other. Raises OverflowError in case of overflow.

View source

#+(other : Int32) : self

Returns the result of adding self and other. Raises OverflowError in case of overflow.

View source

#+(other : Int16) : self

Returns the result of adding self and other. Raises OverflowError in case of overflow.

View source

#+(other : Int8) : self

Returns the result of adding self and other. Raises OverflowError in case of overflow.

View source

#+(other : UInt16) : self

Returns the result of adding self and other. Raises OverflowError in case of overflow.

View source

#+(other : UInt8) : self

Returns the result of adding self and other. Raises OverflowError in case of overflow.

View source

#+(other : Float64) : Float64

Returns the result of adding self and other.

View source

#+(other : Float32) : Float32

Returns the result of adding self and other.

View source

#+(other : UInt32) : self

Returns the result of adding self and other. Raises OverflowError in case of overflow.

View source

#+(other : UInt64) : self

Returns the result of adding self and other. Raises OverflowError in case of overflow.

View source

#-(other : UInt32) : self

Returns the result of subtracting self and other. Raises OverflowError in case of overflow.

View source

#-(other : UInt16) : self

Returns the result of subtracting self and other. Raises OverflowError in case of overflow.

View source

#-(other : UInt128) : self

Returns the result of subtracting self and other. Raises OverflowError in case of overflow.

View source

#-(other : UInt8) : self

Returns the result of subtracting self and other. Raises OverflowError in case of overflow.

View source

#-(other : Int128) : self

Returns the result of subtracting self and other. Raises OverflowError in case of overflow.

View source

#-(other : Int64) : self

Returns the result of subtracting self and other. Raises OverflowError in case of overflow.

View source

#-(other : Int32) : self

Returns the result of subtracting self and other. Raises OverflowError in case of overflow.

View source

#-(other : Int16) : self

Returns the result of subtracting self and other. Raises OverflowError in case of overflow.

View source

#-(other : Int8) : self

Returns the result of subtracting self and other. Raises OverflowError in case of overflow.

View source

#-(other : Float64) : Float64

Returns the result of subtracting self and other.

View source

#-(other : Float32) : Float32

Returns the result of subtracting self and other.

View source

#-(other : UInt64) : self

Returns the result of subtracting self and other. Raises OverflowError in case of overflow.

View source

#/(other : BigInt) : BigFloat

View source

#/(other : UInt8) : Float64

View source

#/(other : Int16) : Float64

View source

#/(other : UInt16) : Float64

View source

#/(other : Int8) : Float64

View source

#/(other : Int32) : Float64

View source

#/(other : UInt32) : Float64

View source

#/(other : Int64) : Float64

View source

#/(other : UInt64) : Float64

View source

#/(other : Int128) : Float64

View source

#/(other : UInt128) : Float64

View source

#/(other : Float32) : Float32

View source

#/(other : Float64) : Float64

View source

#<(other : Int8) : Bool

Returns true if self is less than other.

View source

#<(other : Int16) : Bool

Returns true if self is less than other.

View source

#<(other : Int32) : Bool

Returns true if self is less than other.

View source

#<(other : Int64) : Bool

Returns true if self is less than other.

View source

#<(other : Int128) : Bool

Returns true if self is less than other.

View source

#<(other : UInt8) : Bool

Returns true if self is less than other.

View source

#<(other : UInt16) : Bool

Returns true if self is less than other.

View source

#<(other : UInt32) : Bool

Returns true if self is less than other.

View source

#<(other : UInt64) : Bool

Returns true if self is less than other.

View source

#<(other : UInt128) : Bool

Returns true if self is less than other.

View source

#<(other : Float32) : Bool

Returns true if self is less than other.

View source

#<(other : Float64) : Bool

Returns true if self is less than other.

View source

#<=(other : Float32) : Bool

Returns true if self is less than or equal to other.

View source

#<=(other : Int8) : Bool

Returns true if self is less than or equal to other.

View source

#<=(other : Int16) : Bool

Returns true if self is less than or equal to other.

View source

#<=(other : Int32) : Bool

Returns true if self is less than or equal to other.

View source

#<=(other : Int64) : Bool

Returns true if self is less than or equal to other.

View source

#<=(other : Int128) : Bool

Returns true if self is less than or equal to other.

View source

#<=(other : UInt8) : Bool

Returns true if self is less than or equal to other.

View source

#<=(other : UInt16) : Bool

Returns true if self is less than or equal to other.

View source

#<=(other : UInt32) : Bool

Returns true if self is less than or equal to other.

View source

#<=(other : UInt64) : Bool

Returns true if self is less than or equal to other.

View source

#<=(other : UInt128) : Bool

Returns true if self is less than or equal to other.

View source

#<=(other : Float64) : Bool

Returns true if self is less than or equal to other.

View source

#==(other : Int8) : Bool

Returns true if self is equal to other.

View source

#==(other : Int16) : Bool

Returns true if self is equal to other.

View source

#==(other : Int32) : Bool

Returns true if self is equal to other.

View source

#==(other : Int64) : Bool

Returns true if self is equal to other.

View source

#==(other : Int128) : Bool

Returns true if self is equal to other.

View source

#==(other : UInt8) : Bool

Returns true if self is equal to other.

View source

#==(other : UInt16) : Bool

Returns true if self is equal to other.

View source

#==(other : UInt32) : Bool

Returns true if self is equal to other.

View source

#==(other : UInt128) : Bool

Returns true if self is equal to other.

View source

#==(other : Float32) : Bool

Returns true if self is equal to other.

View source

#==(other : Float64) : Bool

Returns true if self is equal to other.

View source

#==(other : UInt64) : Bool

Returns true if self is equal to other.

View source

#>(other : Int16) : Bool

Returns true if self is greater than other.

View source

#>(other : Int8) : Bool

Returns true if self is greater than other.

View source

#>(other : Int32) : Bool

Returns true if self is greater than other.

View source

#>(other : Int64) : Bool

Returns true if self is greater than other.

View source

#>(other : Int128) : Bool

Returns true if self is greater than other.

View source

#>(other : UInt8) : Bool

Returns true if self is greater than other.

View source

#>(other : UInt16) : Bool

Returns true if self is greater than other.

View source

#>(other : UInt32) : Bool

Returns true if self is greater than other.

View source

#>(other : UInt64) : Bool

Returns true if self is greater than other.

View source

#>(other : UInt128) : Bool

Returns true if self is greater than other.

View source

#>(other : Float32) : Bool

Returns true if self is greater than other.

View source

#>(other : Float64) : Bool

Returns true if self is greater than other.

View source

#>=(other : Int8) : Bool

Returns true if self is greater than or equal to other.

View source

#>=(other : Float64) : Bool

Returns true if self is greater than or equal to other.

View source

#>=(other : Float32) : Bool

Returns true if self is greater than or equal to other.

View source

#>=(other : UInt128) : Bool

Returns true if self is greater than or equal to other.

View source

#>=(other : UInt64) : Bool

Returns true if self is greater than or equal to other.

View source

#>=(other : UInt32) : Bool

Returns true if self is greater than or equal to other.

View source

#>=(other : UInt16) : Bool

Returns true if self is greater than or equal to other.

View source

#>=(other : UInt8) : Bool

Returns true if self is greater than or equal to other.

View source

#>=(other : Int128) : Bool

Returns true if self is greater than or equal to other.

View source

#>=(other : Int64) : Bool

Returns true if self is greater than or equal to other.

View source

#>=(other : Int32) : Bool

Returns true if self is greater than or equal to other.

View source

#>=(other : Int16) : Bool

Returns true if self is greater than or equal to other.

View source

#^(other : Int8) : self

Returns the result of performing a bitwise XOR of self's and other's bits.

View source

#^(other : Int16) : self

Returns the result of performing a bitwise XOR of self's and other's bits.

View source

#^(other : Int32) : self

Returns the result of performing a bitwise XOR of self's and other's bits.

View source

#^(other : Int64) : self

Returns the result of performing a bitwise XOR of self's and other's bits.

View source

#^(other : Int128) : self

Returns the result of performing a bitwise XOR of self's and other's bits.

View source

#^(other : UInt8) : self

Returns the result of performing a bitwise XOR of self's and other's bits.

View source

#^(other : UInt16) : self

Returns the result of performing a bitwise XOR of self's and other's bits.

View source

#^(other : UInt32) : self

Returns the result of performing a bitwise XOR of self's and other's bits.

View source

#^(other : UInt64) : self

Returns the result of performing a bitwise XOR of self's and other's bits.

View source

#^(other : UInt128) : self

Returns the result of performing a bitwise XOR of self's and other's bits.

View source

#abs

Returns the absolute value of this number.

123.abs  # => 123
-123.abs # => 123
View source

#clone

View source

#leading_zeros_count

Returns the number of leading 0-bits.

View source

#popcount

Counts 1-bits in the binary representation of this integer.

5.popcount   # => 2
-15.popcount # => 29
View source

#to_f : Float64

Returns self converted to Float64. Raises OverflowError in case of overflow.

View source

#to_f! : Float64

Returns self converted to Float64. In case of overflow a wrapping is performed.

View source

#to_f32 : Float32

Returns self converted to Float32. Raises OverflowError in case of overflow.

View source

#to_f32! : Float32

Returns self converted to Float32. In case of overflow a wrapping is performed.

View source

#to_f64 : Float64

Returns self converted to Float64. Raises OverflowError in case of overflow.

View source

#to_f64! : Float64

Returns self converted to Float64. In case of overflow a wrapping is performed.

View source

#to_i : Int32

Returns self converted to Int32. Raises OverflowError in case of overflow.

View source

#to_i! : Int32

Returns self converted to Int32. In case of overflow a wrapping is performed.

View source

#to_i128 : Int128

Returns self converted to Int128. Raises OverflowError in case of overflow.

View source

#to_i128! : Int128

Returns self converted to Int128. In case of overflow a wrapping is performed.

View source

#to_i16 : Int16

Returns self converted to Int16. Raises OverflowError in case of overflow.

View source

#to_i16! : Int16

Returns self converted to Int16. In case of overflow a wrapping is performed.

View source

#to_i32 : Int32

Returns self converted to Int32. Raises OverflowError in case of overflow.

View source

#to_i32! : Int32

Returns self converted to Int32. In case of overflow a wrapping is performed.

View source

#to_i64 : Int64

Returns self converted to Int64. Raises OverflowError in case of overflow.

View source

#to_i64! : Int64

Returns self converted to Int64. In case of overflow a wrapping is performed.

View source

#to_i8 : Int8

Returns self converted to Int8. Raises OverflowError in case of overflow.

View source

#to_i8! : Int8

Returns self converted to Int8. In case of overflow a wrapping is performed.

View source

#to_u : UInt32

Returns self converted to UInt32. Raises OverflowError in case of overflow.

View source

#to_u! : UInt32

Returns self converted to UInt32. In case of overflow a wrapping is performed.

View source

#to_u128 : UInt128

Returns self converted to UInt128. Raises OverflowError in case of overflow.

View source

#to_u128! : UInt128

Returns self converted to UInt128. In case of overflow a wrapping is performed.

View source

#to_u16 : UInt16

Returns self converted to UInt16. Raises OverflowError in case of overflow.

View source

#to_u16! : UInt16

Returns self converted to UInt16. In case of overflow a wrapping is performed.

View source

#to_u32 : UInt32

Returns self converted to UInt32. Raises OverflowError in case of overflow.

View source

#to_u32! : UInt32

Returns self converted to UInt32. In case of overflow a wrapping is performed.

View source

#to_u64 : UInt64

Returns self converted to UInt64. Raises OverflowError in case of overflow.

View source

#to_u64! : UInt64

Returns self converted to UInt64. In case of overflow a wrapping is performed.

View source

#to_u8 : UInt8

Returns self converted to UInt8. Raises OverflowError in case of overflow.

View source

#to_u8! : UInt8

Returns self converted to UInt8. In case of overflow a wrapping is performed.

View source

#trailing_zeros_count

Returns the number of trailing 0-bits.

View source

#unsafe_chr : Char

Returns a Char that has the unicode codepoint of self, without checking if this integer is in the range valid for chars (0..0x10ffff).

You should never use this method unless chr turns out to be a bottleneck.

97.unsafe_chr # => 'a'
View source

#|(other : Int8) : self

Returns the result of performing a bitwise OR of self's and other's bits.

View source

#|(other : Int16) : self

Returns the result of performing a bitwise OR of self's and other's bits.

View source

#|(other : UInt128) : self

Returns the result of performing a bitwise OR of self's and other's bits.

View source

#|(other : UInt64) : self

Returns the result of performing a bitwise OR of self's and other's bits.

View source

#|(other : UInt32) : self

Returns the result of performing a bitwise OR of self's and other's bits.

View source

#|(other : UInt16) : self

Returns the result of performing a bitwise OR of self's and other's bits.

View source

#|(other : UInt8) : self

Returns the result of performing a bitwise OR of self's and other's bits.

View source

#|(other : Int128) : self

Returns the result of performing a bitwise OR of self's and other's bits.

View source

#|(other : Int64) : self

Returns the result of performing a bitwise OR of self's and other's bits.

View source

#|(other : Int32) : self

Returns the result of performing a bitwise OR of self's and other's bits.

View source