MCPcopy Create free account
hub / github.com/cogentcore/core / DeleteAt

Method DeleteAt

core/table.go:372–383  ·  view source on GitHub ↗

DeleteAt deletes the element at the given index from the slice.

(idx int)

Source from the content-addressed store, hash-verified

370
371// DeleteAt deletes the element at the given index from the slice.
372func (tb *Table) DeleteAt(idx int) {
373 if idx < 0 || idx >= tb.SliceSize {
374 return
375 }
376
377 tb.DeleteAtSelect(idx)
378
379 reflectx.SliceDeleteAt(tb.Slice, idx)
380
381 tb.This.(Lister).UpdateSliceSize()
382 tb.UpdateChange()
383}
384
385// SortSlice sorts the slice according to current settings.
386func (tb *Table) SortSlice() {

Callers

nothing calls this directly

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 4

SliceDeleteAtFunction · 0.92
DeleteAtSelectMethod · 0.80
UpdateChangeMethod · 0.80
UpdateSliceSizeMethod · 0.65

Tested by

no test coverage detected