untildify

Crates.iountildify
lib.rsuntildify
version0.1.1
sourcesrc
created_at2021-09-19 10:14:18.597679
updated_at2022-07-11 12:58:12.64857
descriptionUtility to replace ~ with user home directory.
homepagehttps://github.com/sathishsoundharajan/untildify
repositoryhttps://github.com/sathishsoundharajan/untildify
max_upload_size
id453563
size5,533
Sathish (sathishsoundharajan)

documentation

https://docs.rs/untildify

README

untildify

Utility to replace ~ with user home directory

Example

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/");
}

Commit count: 8

cargo fmt