#utils #function #random #lib #common #rust

rufl

A powerful util function library for rust

2 releases

new 0.1.2 Apr 16, 2024
0.1.1 Apr 16, 2024

#365 in Algorithms

Download history 231/week @ 2024-04-15

231 downloads per month

MIT license

180KB
3.5K SLoC


Rufl is an util function library for rust. It provides a series of useful functions to make your rust development easier.

Rufl is short for "rust util function library".

crates.io Documentation MSRV CI License

简体中文

Features

  • Powerful: supports commonly used development features, string, collection, random, file... etc.
  • Pure: keep external dependencies to a minimum.
  • Simple: well structure, test for every function.

Installation

  • cargo add rufl
[dependencies]
rufl = "0.1.1"

Example

Here takes the string function add_commas (Add comma to a number value by every 3 numbers from right. Ahead by prefix symbol.) as an example, and the rufl::string mod needs to be used.

Code:

use rufl::string;

fn main() {
    let money_amount: String = string::add_commas("1234567", "$");
    println!("current money is {}", money_amount); // current money is $1,234,567
}

Dependencies

~3–4MB
~70K SLoC