[][src]Function voight_kampff::bot

pub fn bot(user_agent: &str) -> bool

Checks if a user agent is in the list of bots, if so it returns true.

Example

use voight_kampff;

assert_eq!(voight_kampff::bot("DoCoMo/2.0 N905i(c100;TB;W24H16) (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html"), true);