#path #tilde #expand #light-weight #performance

simple-expand-tilde

Cross-platform and reliable tilde-expansion solution

13 releases

0.4.6 Jan 14, 2025
0.4.5 Dec 2, 2024
0.4.4 Nov 5, 2024
0.4.0 Jul 20, 2024
0.1.4 Jan 21, 2024

#608 in Filesystem

Download history 352/week @ 2024-10-07 228/week @ 2024-10-14 275/week @ 2024-10-21 242/week @ 2024-10-28 449/week @ 2024-11-04 266/week @ 2024-11-11 271/week @ 2024-11-18 274/week @ 2024-11-25 254/week @ 2024-12-02 85/week @ 2024-12-09 101/week @ 2024-12-16 6/week @ 2024-12-23 4/week @ 2024-12-30 47/week @ 2025-01-06 236/week @ 2025-01-13 122/week @ 2025-01-20

410 downloads per month

MIT license

3KB

simple-expand-tilde

Crate

A minimal, fast, and reliable tilde expansion solution.

Usage

use simple_expand_tilde::*;

fn main() {
    // Windows  =>  C:\Users\jdoe\.rustup
    // Linux    =>  /home/jdoe/.rustup
    // Mac      =>  /Users/jdoe/.rustup
    let path = expand_tilde("~/.rustup").unwrap();
}

Dependencies

~0–6.5MB
~31K SLoC