Modification of operator = using string (change capacity and length)