Skip to content

Utility to replace ~ with user home directory

License

Notifications You must be signed in to change notification settings

aminya/untildify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Utility to replace ~ with user home directory

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%