Change ~str to String.