def set_conversion(self, idx):
        """
        Adds the conversion to the format.

        :param idx: The ending index of the conversion name.
        """

        # First, determine the name
        if self.conv_begin:
            name = self.format[self.conv_begin:idx]
        else:
            name = self.format[idx]

        # Next, add the status code modifiers, as needed
        if self.codes:
            self.modifier.set_codes(self.codes, self.reject)

        # Append the conversion to the format
        self.fmt.append_conv(self.fmt._get_conversion(name, self.modifier))

        # Clear the conversion data
        self.param_begin = None
        self.conv_begin = None
        self.modifier = None
        self.codes = []
        self.reject = False
        self.code_last = False
Adds the conversion to the format.

        :param idx: The ending index of the conversion name.