Skip to main content

parse_device_type

Function parse_device_type 

Source
pub fn parse_device_type(user_agent: &str) -> String
Expand description

Classify the device type from the User-Agent string.

Returns one of "tablet", "mobile", or "desktop".