[−][src]Function clean_url::utils::has_www
pub async fn has_www<'_>(url: &'_ str) -> bool
Checks if a URL uses www
Usage:
use clean_url::utils::has_www; use tokio_test::block_on; assert_eq!(true, block_on(has_www("http://www.example.com"))); assert_eq!(false, block_on(has_www("http://example.com"))); //assert_eq!(String::from("http://www.example.com"), swap_www("http://example.com")); //assert_eq!(String::from("http://example.com"), swap_www("http://www.example.com"));