package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module UInt32Source

Unsigned 32-bit integer (guint32).

Backed by private int — no heap allocation. Range: 0, 4294967295.

Requires a 64-bit OCaml runtime. ocgtk does not support 32-bit targets.

Sourcetype t = private int
Sourceval of_int : int -> t

of_int n converts n to a UInt32.t.

Sourceval to_int : t -> int

to_int v returns the underlying integer value.

Sourceval min_int : t

The minimum value: 0.

Sourceval max_int : t

The maximum value: 4294967295.

Sourceval zero : t

Alias for min_int: 0.

Sourceval min_value : int

The minimum value representable as an int, equal to to_int min_int.

Sourceval max_value : int

The maximum value representable as an int, equal to to_int max_int.

Sourceval of_string : string -> t

Parse a decimal integer string into a UInt32.t.

  • raises Failure

    if the string is not a valid integer.

Sourceval to_string : t -> string

Format as a decimal string.

Sourceval of_int64 : int64 -> t

Convert an int64 to UInt32.t, masking to 32 bits.

Sourceval to_int64 : t -> int64

Convert to int64. Result is always non-negative.