A oneliner to convert str to loc