1
0
Fork 0
forked from fun/fun

Added some more HEX (dec_to_hex()) to Fun. (0.37.15)

This commit is contained in:
Johannes Findeisen 2025-12-18 10:29:50 +01:00
commit 37c5ae6f58
5 changed files with 66 additions and 2 deletions

View file

@ -32,7 +32,7 @@ print("Hex bytes array:")
bytes = hex_to_bytes(hexstr)
print(to_string(bytes))
echo("Hex dump to bytes:")
print("Hex dump to bytes:")
print(bytes)
print("Back to hex from bytes:")
@ -44,6 +44,12 @@ print(to_string(hex_to_dec(substr(hexstr, 0, 8))))
print("Hex as decimal (all bytes):")
print(to_string(hex_to_dec(hexstr)))
print("Decimal to hex (4135093009263527588):")
print(dec_to_hex(4135093009263527588))
print("Decimal to hex (1353150228):")
print(dec_to_hex(1353150228))
/* Expected output:
--- Hex utility demo (fixed values) ---
Fixed Hex string:
@ -59,4 +65,8 @@ Hex as decimal (first 4 bytes - 0x50a76f14):
1353150228
Hex as decimal (all bytes):
4135093009263527588
Decimal to hex (4135093009263527588):
3962cd2eea5a86a4
Decimal to hex (1353150228):
50a76f14
*/