Advertisement
Wikked

Text Conversions

Oct 30th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.46 KB | None | 0 0
  1. alias bin {
  2.   var %return = $iif($isid, return, echo -ag)
  3.   ;// Binary to Text
  4.   if ($regex($1, /([01]{8})/gSi)) %return $regsubex($1, /(\d{8})/gSi, $chr($base(\t, 2, 10)))
  5.   ;// Text to Binary
  6.   else %return $regsubex($1, /(.)/gSi, $base($asc(\t), 10, 2, 8))
  7. }
  8. alias hex2txt $iif($isid, return, echo -ag) $regsubex($1, /([0-9A-F]{2})/gSi, $chr($base(\t, 16, 10)))
  9. 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