Crates.io | untildify |
lib.rs | untildify |
version | 0.1.1 |
source | src |
created_at | 2021-09-19 10:14:18.597679 |
updated_at | 2022-07-11 12:58:12.64857 |
description | Utility to replace ~ with user home directory. |
homepage | https://github.com/sathishsoundharajan/untildify |
repository | https://github.com/sathishsoundharajan/untildify |
max_upload_size | |
id | 453563 |
size | 5,533 |
Utility to replace ~ with user home directory
extern crate untildify;
fn main() {
println!("Untildify : {}", untildify::untildify("~/Desktop"));
// prints /Users/<user_name>/Desktop
// Other Examples
assert_eq!(untildify("~/a/b/c/d/e"), "/User/Untildify/a/b/c/d/e");
assert_eq!(untildify("~/"), "/User/Untildify/");
}