* String returns a string representation of the protected region of memory. */
()
| 380 | String returns a string representation of the protected region of memory. |
| 381 | */ |
| 382 | func (b *LockedBuffer) String() string { |
| 383 | slice := b.Bytes() |
| 384 | return *(*string)(unsafe.Pointer(&slice)) |
| 385 | } |
| 386 | |
| 387 | /* |
| 388 | Uint16 returns a slice pointing to the protected region of memory with the data represented as a sequence of unsigned 16 bit integers. Its length will be half that of the byte slice, excluding any remaining part that doesn't form a complete uint16 value. |