UAParser.OperatingSystem (ua_parser v1.9.1) View Source

A module representing an operating System struct.

Link to this section Summary

Functions

Examples

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

iex> os = %UAParser.OperatingSystem{family: "macOS"}
iex> to_string(os)
"macOS"

Link to this section Types

Specs

t() :: %UAParser.OperatingSystem{family: String.t(), version: String.t()}

Link to this section Functions

Link to this function

%UAParser.OperatingSystem{}

View Source (struct)

Examples

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

iex> os = %UAParser.OperatingSystem{family: "macOS"}
iex> to_string(os)
"macOS"