andreasewering / elm-protoc-utils / Protobuf.Utils.Int64

Utility methods for Int64 needed in the Protobuf/gRPC context.

toSignedString : Protobuf.Types.Int64.Int64 -> String

Interpret a Int64 as an unsigned integer, and give its string representation.

toSignedString (fromInt 10)
    --> "10"

toSignedString (fromInt -10)
    --> "-10"

toUnsignedString : Protobuf.Types.Int64.Int64 -> String

Interpret a Int64 as an unsigned integer, and give its string representation

toUnsignedString (fromInt 10)
    --> "10"

toUnsignedString (fromInt -10)
    --> "18446744073709551606"