Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias bin {
- var %return = $iif($isid, return, echo -ag)
- ;// Binary to Text
- if ($regex($1, /([01]{8})/gSi)) %return $regsubex($1, /(\d{8})/gSi, $chr($base(\t, 2, 10)))
- ;// Text to Binary
- else %return $regsubex($1, /(.)/gSi, $base($asc(\t), 10, 2, 8))
- }
- alias hex2txt $iif($isid, return, echo -ag) $regsubex($1, /([0-9A-F]{2})/gSi, $chr($base(\t, 16, 10)))
- alias txt2hex $iif($isid, return, echo -ag) $regsubex($1, /(.)/gSi, $base($asc(\t), 10, 16, 2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement