generic string converter