UAParser.Version (ua_parser v1.9.1) View Source

A module representing user agent version struct and helper methods.

Link to this section Summary

Functions

Examples

iex> version = %UAParser.Version{major: "1", minor: "2", patch: "3", patch_minor: "4"}
iex> to_string(version)
"1.2.3.4"

iex> version = %UAParser.Version{major: "1", minor: "2", patch: "3"}
iex> to_string(version)
"1.2.3"

iex> version = %UAParser.Version{major: "1", minor: "2"}
iex> to_string(version)
"1.2"

iex> version = %UAParser.Version{major: "1"}
iex> to_string(version)
"1"

Link to this section Types

Specs

t() :: %UAParser.Version{
  major: term(),
  minor: term(),
  patch: term(),
  patch_minor: term()
}

Link to this section Functions

Link to this function

%UAParser.Version{}

View Source (struct)

Examples

iex> version = %UAParser.Version{major: "1", minor: "2", patch: "3", patch_minor: "4"}
iex> to_string(version)
"1.2.3.4"

iex> version = %UAParser.Version{major: "1", minor: "2", patch: "3"}
iex> to_string(version)
"1.2.3"

iex> version = %UAParser.Version{major: "1", minor: "2"}
iex> to_string(version)
"1.2"

iex> version = %UAParser.Version{major: "1"}
iex> to_string(version)
"1"