b 0.1.0 copy "b: ^0.1.0" to clipboard
b: ^0.1.0 copied to clipboard

outdated

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

8
likes
0
pub points
73%
popularity

Publisher

verified publisherdart.dkinom.dev

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

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

characters, invertible

More

Packages that depend on b