mirror of
https://github.com/Unkn0wnCat/data-toolbox-site.git
synced 2025-06-02 08:51:36 +02:00
Add support for 0x prefix in hexadecimal
This commit is contained in:
parent
1a3c739061
commit
ca0a6cf102
3 changed files with 3 additions and 5 deletions
|
@ -26,7 +26,7 @@ const NumberBaseTool = () => {
|
|||
num = parseInt(input.replaceAll(" ", ""), 10)
|
||||
break
|
||||
case "hex":
|
||||
num = parseInt(input.replaceAll(" ", ""), 16)
|
||||
num = parseInt(input.replaceAll(" ", "").replace(/^(0x)/,''), 16)
|
||||
break
|
||||
case "oct":
|
||||
num = parseInt(input.replaceAll(" ", ""), 8)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue