def _get_horizontal_line(self, char, intersect_left,
                             intersect_mid, intersect_right):
        """Get a horizontal line for the table.

        Internal method used to actually get all horizontal lines in the table.
        Column width should be set prior to calling this method. This method
        detects intersection and handles it according to the values of
        `intersect_*_*` attributes.

        Parameters
        ----------
        char : str
            Character used to draw the line.

        Returns
        -------
        str
            String which will be printed as the Top border of the table.
        """
        width = self.get_table_width()

        try:
            line = list(char * (int(width/termwidth(char)) + 1))[:width]
        except ZeroDivisionError:
            line = [' '] * width

        if len(line) == 0:
            return ''

        # Only if Special Intersection is enabled and horizontal line is
        # visible
        if not char.isspace():
            # If left border is enabled and it is visible
            visible_junc = not intersect_left.isspace()
            if termwidth(self.left_border_char) > 0:
                if not (self.left_border_char.isspace() and visible_junc):
                    length = min(termwidth(self.left_border_char),
                                 termwidth(intersect_left))
                    for i in range(length):
                        line[i] = intersect_left[i]
            visible_junc = not intersect_right.isspace()
            # If right border is enabled and it is visible
            if termwidth(self.right_border_char) > 0:
                if not (self.right_border_char.isspace() and visible_junc):
                    length = min(termwidth(self.right_border_char),
                                 termwidth(intersect_right))
                    for i in range(length):
                        line[-i-1] = intersect_right[-i-1]
            visible_junc = not intersect_mid.isspace()
            # If column separator is enabled and it is visible
            if termwidth(self.column_separator_char):
                if not (self.column_separator_char.isspace() and visible_junc):
                    index = termwidth(self.left_border_char)
                    for i in range(self._column_count-1):
                        index += (self._column_widths[i])
                        length = min(termwidth(self.column_separator_char),
                                     termwidth(intersect_mid))
                        for i in range(length):
                            line[index+i] = intersect_mid[i]
                        index += termwidth(self.column_separator_char)

        return ''.join(line)
Get a horizontal line for the table.

        Internal method used to actually get all horizontal lines in the table.
        Column width should be set prior to calling this method. This method
        detects intersection and handles it according to the values of
        `intersect_*_*` attributes.

        Parameters
        ----------
        char : str
            Character used to draw the line.

        Returns
        -------
        str
            String which will be printed as the Top border of the table.