aboutsummaryrefslogtreecommitdiff
path: root/gen/src/gleam@int.erl
blob: ea97785a398255842612f5ae8618e677a911f0fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-module(gleam@int).
-compile(no_auto_import).

-export([parse/1, to_string/1, to_base_string/2, compare/2]).

parse(A) ->
    gleam_stdlib:parse_int(A).

to_string(A) ->
    erlang:integer_to_binary(A).

to_base_string(A, B) ->
    erlang:integer_to_binary(A, B).

compare(A, B) ->
    case A =:= B of
        true ->
            eq;

        false ->
            case A < B of
                true ->
                    lt;

                false ->
                    gt
            end
    end.