SimpleByteUnit/README.md
Xavier Moffett f94bfbff3e
All checks were successful
Build / Check format (push) Successful in 38s
Build / Check release (push) Successful in 44s
chore: Prepare for release 0.3.0
2025-07-19 18:19:51 -04:00

30 lines
735 B
Markdown

# SimpleByteUnit [![Build Workflow](https://git.sapphirus.org/Sapphirus/SimpleByteUnit/badges/workflows/check.yml/badge.svg?label=build&logo=github+actions&logoColor=d1d7e0&style=flat-square)](https://git.sapphirus.org/Sapphirus/SimpleByteUnit/actions?workflow=check.yml)
SimpleByteUnit is a crate which provides a thin encapsulate for integer primitives to facilitate a fast, simple, yet ergonomic byteunit implementation.
## Usage
Add 'simplebyteunit' to your 'Cargo.toml':
```
[dependencies]
simplebyteunit = "0.3.0"
```
## Example
Generate a human-readable, formatted ByteUnit:
```
use simplebyteunit::simplebyteunit::*;
let byteunit_var = 500000.to_byteunit(SI);
println!("{byteunit_var}");
```
Output:
```
500 kB
```