liferooter / textpieces

Quick text processing
GNU General Public License v3.0
203 stars 21 forks source link

Add tools: hexadecimal to decimal and vice-versa #131

Open ZtereoHYPE opened 1 year ago

ZtereoHYPE commented 1 year ago

This mimics Boop's hex to dec and vice-versa conversion, maintaining other strings, newlines, and spaces.

Example IO:

Hexadecimal to decimal

Input:

0x123 123 
0xABC abc
0x456555 hello

0x123zz

Output:

291 291
2748 2748
4547925 hello

0x123zz

Decimal to hexadecimal

Input:

291 291
2748 2748
4547925 hello

0x123zz

Output:

0x123 0x123
0xabc 0xabc
0x456555 hello

0x123zz