MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / IntArrayCapUp

Function IntArrayCapUp

strings/ahocorasick/shared.go:70–75  ·  view source on GitHub ↗

IntArrayCapUp Dynamically increases an array size of int's by 1.

(old []int)

Source from the content-addressed store, hash-verified

68
69// IntArrayCapUp Dynamically increases an array size of int's by 1.
70func IntArrayCapUp(old []int) (new []int) {
71 new = make([]int, cap(old)+1)
72 copy(new, old) //copy(dst,src)
73 // old = new
74 return new
75}
76
77// BoolArrayCapUp Dynamically increases an array size of bool's by 1.
78func BoolArrayCapUp(old []bool) (new []bool) {

Callers 4

AhoCorasickFunction · 0.85
AdvancedFunction · 0.85
ConstructTrieFunction · 0.85
ArrayUnionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected