Size: 469
Comment:
|
Size: 473
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
{{{ | {{{ |
Line 12: | Line 12: |
}}} | }}} |
Line 16: | Line 16: |
{{{ | {{{ |
Line 22: | Line 22: |
}}} | }}} |
Hex And Text
From time to time you might have to convert strings to hex or vice versa:
HexToText←{ a←16|'123456789ABCDEF0123456789abcdef'⍳⍵ a←{⍵⍴⍨2,⍨0.5×⍴⍵}a a←16⊥⍉a {⍵{(⍺{⍵⍴(⍵÷⍴⍺)↑1}⍴⍵)/⍵}82 ⎕DR ⍵}a }
And the other way around:
TextToHex←{ a←83 ⎕DR ⍵ a←1+,⍉16 16⊤a '0123456789ABCDEF'[a] }