How to rewrite this code so I don't need str1 and str2 (i.e. no conversion)

Printable View