MCPcopy Create free account
hub / github.com/dank/rlapi / decodeUTF16

Function decodeUTF16

tools/version/main.go:163–173  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

161}
162
163func decodeUTF16(data []byte) string {
164 var chars []uint16
165 for i := 0; i+1 < len(data); i += 2 {
166 c := binary.LittleEndian.Uint16(data[i:])
167 if c == 0 {
168 break
169 }
170 chars = append(chars, c)
171 }
172 return string(utf16.Decode(chars))
173}

Callers 1

scanBuildIDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected