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

simple-expand-tilde

Cross-platform and reliable tilde-expansion solution

13 releases

new 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

#593 in Filesystem

Download history 341/week @ 2024-09-24 401/week @ 2024-10-01 338/week @ 2024-10-08 276/week @ 2024-10-15 242/week @ 2024-10-22 219/week @ 2024-10-29 468/week @ 2024-11-05 281/week @ 2024-11-12 248/week @ 2024-11-19 374/week @ 2024-11-26 130/week @ 2024-12-03 83/week @ 2024-12-10 93/week @ 2024-12-17 5/week @ 2024-12-24 6/week @ 2024-12-31 64/week @ 2025-01-07

177 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
~33K SLoC