5 Seperate aliases to do some fairly simple tasks
html2chr: converts html encoded ascii characters to normal symbols
-- helpful for sockets as it scans the entire line
oct: retrieves octal code for ascii symbol
Rate & Comment & Likes if you find it helpful ;)
; syntax: $html2chr(txt)
; -- returns "txt" with converted &#<x> values
; -- e.g. $html2chr(d) -- "d"
alias html2chr return $replace($regsubex($1-,/(&#(\d*));?/g,$chr(\2)), ,$chr(32),&,&)
; syntax: $oct2chr(txt)
; -- returns "txt", converting any 3 number selections from octal to their ascii symbols
; -- e.g. $oct2chr(100) -- "@"
alias oct2chr return $regsubex($1-,/(\d{3})/g,$chr($base(\1,8,10,0)))
; syntax: $oct(X)
; -- returns octal value of character "X"
; -- e.g. $oct(@) -- "100"
alias oct return $base($asc($1),10,8,3)
; syntax: $hex2chr(txt)
; -- returns "txt", converting any hex values into their ascii symbols
alias hex2chr return $regsubex($1-,/(\d{2}|\w+)/g,$chr($base(\1,16,10,0)))
; syntax: $hex(X)
; -- returns hex value of character "X"
; -- e.g. $hex(?) -- "3F"
alias hex return $base($asc($1),10,16,0)