Yesterday's posting "Arrows in function names: func:b64⇉hex() and func:bin┈⇢dec()"
demonstrated that arrows from Unicode "Arrows" range 2190-21FF as well as other Unicode characters can be part of function names.
The attached and described stylesheet povides useful conversion functions in addition to dp:radix-convert() (see
Here a conversion of type "...
while a conversion of type "...
func:bin⇉hex()
for a nice XPath technique).Here a conversion of type "...
⇉
..."
preserves leading '0's,while a conversion of type "...
┈⇢
..." does not preserve leading '0's (like dp:radix-convert() ).
b64 (base64), hex, bin (01-strings) and dec (number) can be converted by these function calls:
b64 to
hex
: dp:radix-convert(_,64,16)
hex: func:b64⇉hex(_)
dec: dp:radix-convert(_,64,10)
hex to
b64
: dp:radix-convert(_,16,64)
b64: func:hex⇉b64(_)
bin: func:hex⇉bin(_)
dec: dp:radix-convert(_,16,10)
bin to
hex: func:bin⇉hex(_)
dec:
func:bin┈⇢dec(_)
Hermann.