MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / EncodeStringArray

Function EncodeStringArray

pkg/util/utilfn/utilfn.go:433–442  ·  view source on GitHub ↗
(arr []string)

Source from the content-addressed store, hash-verified

431}
432
433func EncodeStringArray(arr []string) []byte {
434 var buf bytes.Buffer
435 for idx, s := range arr {
436 buf.Write(NullEncodeStr(s))
437 if idx < len(arr)-1 {
438 buf.WriteByte(nullEncodeSepByte)
439 }
440 }
441 return buf.Bytes()
442}
443
444func DecodeStringArray(barr []byte) ([]string, error) {
445 if len(barr) == 0 {

Callers

nothing calls this directly

Calls 3

NullEncodeStrFunction · 0.85
BytesMethod · 0.80
WriteMethod · 0.65

Tested by

no test coverage detected