This code is used to reverse the complete string including the delimiters