Buffer returns the underlying []uint16 buffer.
()
| 86 | |
| 87 | // Buffer returns the underlying []uint16 buffer. |
| 88 | func (b *WString) Buffer() []uint16 { |
| 89 | if b.empty() { |
| 90 | return nil |
| 91 | } |
| 92 | return b.b |
| 93 | } |
| 94 | |
| 95 | // Pointer returns a pointer to the first uint16 in the buffer. |
| 96 | // If the [WString.Free] has already been called, the pointer will be nil. |