Integrate @JoelKatz's optimized ToHex (#562) into current HexStr function