b 0.1.0
b: ^0.1.0 copied to clipboard

A Dart library for converting between different bases, e.g., decimal ↔ binary, octal ↔ hexadecimal

b - Base conversion #

Version Build Status Coverage Status License

A Dart library for converting between different bases, e.g., decimal ↔ binary, octal ↔ hexadecimal

Usage #

See example/main.dart

Decimal (emoji) ↔ Hexadecimal #

final BaseConversion decimalEmojiToHexadecimalConverter = BaseConversion(
  from: '0️⃣1️⃣2️⃣3️⃣4️⃣5️⃣6️⃣7️⃣8️⃣9️⃣',
  to: '0123456789ABCDEF',
);

final String hexadecimal = decimalEmojiToHexadecimalConverter('5️⃣1️⃣9️⃣6️⃣6️⃣');
// hexadecimal == 'CAFE'

final String decimalEmoji = decimalEmojiToHexadecimalConverter.inverse()('DEADC0DE');
// decimalEmoji == '3️⃣7️⃣3️⃣5️⃣9️⃣2️⃣9️⃣0️⃣5️⃣4️⃣'

Syntax #

BaseConversion({required String from, required String to}) #

from - String of numeral symbols representing the digits of from numeral system.

to - String of numeral symbols representing the digits of to numeral system.

See documentation for more

License #

MIT

2
likes
130
pub points
0%
popularity

Publisher

dkinom.dev

A Dart library for converting between different bases, e.g., decimal ↔ binary, octal ↔ hexadecimal

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

characters, invertible

More

Packages that depend on b