STRING To HEX Converter

I want to convert a string value which is coming from another board via UART [Serial.readString] to hex value. If the incoming value is "3A" then it should display "003A" . Tried strtoul n sprintf. Both are not working for me