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

Method SetString

tensor/table/table.go:615–628  ·  view source on GitHub ↗

SetString sets the string value of cell at given column (by name), row index for columns that have 1-dimensional tensors. Returns true if set.

(column string, row int, val string)

Source from the content-addressed store, hash-verified

613// SetString sets the string value of cell at given column (by name), row index
614// for columns that have 1-dimensional tensors. Returns true if set.
615func (dt *Table) SetString(column string, row int, val string) bool {
616 if !dt.IsValidRow(row) {
617 return false
618 }
619 ct := dt.ColumnByName(column)
620 if ct == nil {
621 return false
622 }
623 if ct.NumDims() != 1 {
624 return false
625 }
626 ct.SetString1D(row, val)
627 return true
628}
629
630// SetTensorIndex sets the tensor value of cell at given column, row index
631// for columns that have n-dimensional tensors. Returns true if set.

Callers 2

NewTestTableFunction · 0.95
NewSliceTableFunction · 0.95

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 4

IsValidRowMethod · 0.95
ColumnByNameMethod · 0.95
NumDimsMethod · 0.65
SetString1DMethod · 0.65

Tested by 1

NewTestTableFunction · 0.76