(str string)
| 115 | func (stringPool) xml(*xmlContext) string { return "" } |
| 116 | |
| 117 | func utf16EncodeStringPoolEntry(str string) []byte { |
| 118 | var b bytes.Buffer |
| 119 | w := endian.Writer(&b, device.LittleEndian) |
| 120 | runes := utf16.Encode([]rune(str)) |
| 121 | encodeLength(w, uint32(len(runes))) |
| 122 | for _, rune := range runes { |
| 123 | w.Uint16(rune) |
| 124 | } |
| 125 | w.Uint16(0) /* bin_xml.py says so */ |
| 126 | return b.Bytes() |
| 127 | } |
| 128 | |
| 129 | func (c *stringPool) encode() []byte { |
| 130 | if len(c.styles) > 0 { |
no test coverage detected