Module erlang_version

Retrieve Erlang/OTP version like 18.1.

Description

Retrieve Erlang/OTP version like 18.1.

Function Index

full/0Return full version of Erlang/OTP.
major/0Return major version of Erlang/OTP.
minor/0Return minor version of Erlang/OTP.
parse/1Parse binary as Erlang/OTP version.
patch/0Return patch version of Erlang/OTP.
to_tuple/0Return parsed version of Erlang/OTP.

Function Details

full/0

full() -> binary()

Return full version of Erlang/OTP.

major/0

major() -> binary()

Return major version of Erlang/OTP.

minor/0

minor() -> binary()

Return minor version of Erlang/OTP.

parse/1

parse(Bin::binary()) -> {binary(), binary(), binary()}

Parse binary as Erlang/OTP version.

When patch version isn't declered, third element of the tuple is empty binary <<"">>. following like:

  parse(<<"18.1">>) # => {<<"18">>, <<"1">>, <<>>}

When patch version includes many periods, third element of the tuple just returns it. following like:

  parse(<<"18.1.0.1">>) # => {<<"18">>, <<"1">>, <<"0.1">>}

patch/0

patch() -> binary()

Return patch version of Erlang/OTP.

When patch version isn't declered, this function returns empty binary <<>>.

When patch version includes many periods, this function returns binary which includes many periods like <<"0.1">>.

to_tuple/0

to_tuple() -> {binary(), binary(), binary()}

Return parsed version of Erlang/OTP.


Generated by EDoc, Oct 16 2015, 02:09:48.