Convert strings between different formats