Functions could be used but I expect they would be long and cumbersome.

How do you intend to use this conversion?

Joker not used?