#file #alphabetizer #alphabetize

bin+lib file_alphabetizer

A function that takes a file and alphabetizes it

7 releases (stable)

2.1.3 Jun 25, 2022
2.0.0 Jun 5, 2022
1.0.0 Jun 1, 2022
0.1.0 May 10, 2022

#1400 in #file

MIT/Apache

6KB
55 lines

Github CI Crate API

file_alphabetizer

A function that takes a file and alphabetizes it.

Usage

Within a Rust project

  1. Import the library into your Cargo.toml like so:
    [dependencies] 
        file_alphabetizer = "2.1.3"
    
  2. Import the crate and use the alphabetize method, like so. (Currently, path starts at parent directory of code calling it):
        use std::{path::PathBuf};
        use file_alphabetizer;
    
        fn main() {
            let path = PathBuf::from("src/test");
            file_alphabetizer::alphabetize(&path).unwrap();
        }
    

Crate Features

file_alphabetizer sorts non-case-sensitive alphabetical order.

  • Special characters such as brackets are placed after the alphabet
  • Numbers are placed before alphabet

License

file_alphabetizer is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT, and COPYRIGHT for details.

Dependencies

~3MB
~63K SLoC