Add util: is_url(String) -> bool
This commit is contained in:
parent
8ba7e34e34
commit
16d40e9bfe
2 changed files with 7 additions and 0 deletions
|
@ -23,6 +23,7 @@ mod runtime;
|
|||
mod module;
|
||||
mod storage;
|
||||
mod ui;
|
||||
mod util;
|
||||
|
||||
use module::bm::BM;
|
||||
|
||||
|
|
6
src/util/mod.rs
Normal file
6
src/util/mod.rs
Normal file
|
@ -0,0 +1,6 @@
|
|||
use url::Url;
|
||||
|
||||
pub fn is_url(url: &String) -> bool {
|
||||
Url::parse(&url[..]).is_ok()
|
||||
}
|
||||
|
Loading…
Reference in a new issue