MCPcopy Create free account
hub / github.com/copernet/copernicus / RemoveAt

Method RemoveAt

util/stack.go:41–51  ·  view source on GitHub ↗
(index int)

Source from the content-addressed store, hash-verified

39 return e
40}
41func (s *Stack) RemoveAt(index int) bool {
42 if index > s.Size()-1 || index < 0 {
43 return false
44 }
45 if index < s.Size()-1 {
46 s.array = append(s.array[:index], s.array[index+1:]...)
47 } else {
48 s.array = s.array[:index]
49 }
50 return true
51}
52
53func (s *Stack) Erase(begin int, end int) bool {
54 size := s.Size()

Callers 3

TestStackFunction · 0.95
EraseMethod · 0.95
EvalScriptFunction · 0.80

Calls 1

SizeMethod · 0.95

Tested by 1

TestStackFunction · 0.76