use-extension 0.0.1

Practical file extension utility primitives
Documentation
  • Coverage
  • 91.67%
    11 out of 12 items documented1 out of 11 items with examples
  • Size
  • Source code size: 9.32 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 361.95 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • RustUse/use-fs
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-extension

Practical file extension utility primitives for RustUse.

Experimental

use-extension is experimental while the use-fs workspace remains below 0.3.0.

Example

use use_extension::{compound_extension, extension_lowercase};

assert_eq!(extension_lowercase("ARCHIVE.TAR.GZ").as_deref(), Some("gz"));
assert_eq!(compound_extension("archive.tar.gz").as_deref(), Some("tar.gz"));

Scope

  • extension extraction and normalization
  • compound-extension inspection for common patterns
  • simple extension replacement and removal

Non-goals

  • MIME sniffing
  • file-format parsing
  • filesystem I/O

License

Licensed under either of the following, at your option:

  • Apache License, Version 2.0
  • MIT license