sps.c
State deleteExcessCols(Table *table) {
    for (unsigned i=table->cols; i >= 1; i--) {
        bool empty = true;
        for (unsigned j=1; j <= table->rows; j++) {
            if (strcmp(getCellPtr(table, j, i)->str, "") != 0) {
                empty = false;
                break;
            }
        }
        if (empty)
            deleteCol(table);
    }
    return SUCCESS;
}
// deletes columns of the table from the right, that are empty
deletes columns of the table from the right, that are empty
deletes columns of the table from the right that are empty
State deleteExcessCols(Table *table) {
    for (unsigned i=table->cols; i >= 1; i--) {
        bool empty = true;
        for (unsigned j=1; j <= table->rows; j++) {
            if (strcmp(getCellPtr(table, j, i)->str, "") != 0) {
                empty = false;
                break;
            }
        }
        if (empty)
            deleteCol(table);
    }
    return SUCCESS;
}
State deleteExcessCols ( Table * table ) { for ( unsigned i = table -> cols ; i >= 1 ; i -- ) { bool empty = true ; for ( unsigned j = 1 ; j <= table -> rows ; j ++ ) { if ( strcmp ( getCellPtr ( table , j , i ) -> str , " " ) != 0 ) { empty = false ; break ; } } if ( empty ) deleteCol ( table ) ; } return SUCCESS ; }
deletes columns of the table from the right, that are empty
deletes columns of the table from the right that are empty