MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / utf16BE

Function utf16BE

pkg/tabular/tabular_test.go:162–169  ·  view source on GitHub ↗

utf16BE encodes s as UTF-16 big-endian with a BOM.

(s string)

Source from the content-addressed store, hash-verified

160
161// utf16BE encodes s as UTF-16 big-endian with a BOM.
162func utf16BE(s string) []byte {
163 out := make([]byte, 0, 2+2*len(s))
164 out = append(out, 0xFE, 0xFF) // BE BOM
165 for _, r := range s {
166 out = append(out, byte(r>>8), byte(r))
167 }
168 return out
169}

Callers 1

TestParseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected