Restructuring strings