Hexadecimal function

Hi,
I actually needed this, so here it is... I guess it's missing the remaining ones (octal, etc) ;)