Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Copy ¶ added in v1.1.0
func Copy[T any](orig []T) []T
Copy makes a shallow copy of it's input. Given nil, it returns nil.
func Replace ¶
ReplaceBeyond subsitutes replace into dest starting at start.
Dest may be modified.
Replace will panic if start is beyond the end of dest.
func ReplaceBeyond ¶
ReplaceBeyond subsitutes replace into dest starting at start. Start can be beyond the current end of dest.
Dest may be modified.
func Splice ¶
Splice removes replaces dest[start:end] with replace. Replace can be larger or smaller and dest will grow or shrink as needed. Dest will be grown or shrunk as needed.
End must be < len(dest) or else Splice panics.
Dest may be modified.
func SpliceBeyond ¶
SpliceBeyond removes replaces dest[start:end] with replace. Replace can be larger or smaller and dest will grow or shrink as needed. start or end can be beyond the current len or cap of dest and dest will be grown or shrunk as needed.
End must be >= start or else SpliceBeyond panics.
Dest may be modified.
Types ¶
This section is empty.