Different functions to convert between hex, dec bin etc.
Project description
Description
Different functions to convert between hex, dec, bin, ascii etc.
Installation
pip install cnvrtr
Usage
from cnvrtr.Converter import Converter
cnvrtr = Converter(nonAsciiPlaceholder=".")
leHex = cnvrtr.toLittleEndian("af d0 fe")
# fed0af
hexToBin = cnvrtr.hexToBin("fed0af")
# 111111101101000010101111
hexToDec = cnvrtr.hexToDec("fed0af")
# 16699567
binToDec = cnvrtr.binToDec("11010101")
# 213
decToAscii = cnvrtr.decToAscii(65)
# A
hexToAsciiString = cnvrtr.hexToAsciiString("68656c6c6f20776f726c64")
# hello world
hexToAsciiString = cnvrtr.hexToAsciiString("68656c6c6f20016f726c64")
# hello .orld
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cnvrtr-1.1.1.tar.gz
(2.7 kB
view hashes)
Built Distribution
cnvrtr-1.1.1-py3-none-any.whl
(3.0 kB
view hashes)