anybase

Crates.ioanybase
lib.rsanybase
version0.2.3
created_at2025-12-02 09:39:35.481377+00
updated_at2025-12-06 09:45:41.408462+00
descriptionHigh-performance arbitrary base integer conversion library
homepage
repositoryhttps://github.com/Volyyig/anybase
max_upload_size
id1961446
size39,961
Entlst (Volyyig)

documentation

README

🔢 anybase

A Rust library for converting numbers between arbitrary bases.

✨ Features

  • 🔄 Convert between any base
  • ⚡ Fast and efficient algorithms
  • 🎯 Simple, intuitive API
  • 📦 No external dependencies

📥 Installation

Run the following command in your project directory:

cargo add anybase

💡 Usage

use anybase::{convert_base, Converter};

// Functional
let result = convert_base("ff", "0123456789abcdef", "01234567").unwrap();
assert_eq!(result, "377");

// Object-oriented
let converter = Converter::new("01", "0123456789");
let result = converter.convert("1010").unwrap();
assert_eq!(result, "10");

📄 License

MIT OR Apache-2.0

🤝 Contributing

Contributions welcome! Please open an issue or submit a pull request.

Commit count: 0

cargo fmt