unsafeString performs an unsafe conversion from a []byte to a string. The returned string will share the underlying memory with the []byte which thus allows the string to be mutable through the []byte. We're careful to use this method only in situations in which the []byte will not be modified.
(b []byte)
| 757 | // allows the string to be mutable through the []byte. We're careful to use |
| 758 | // this method only in situations in which the []byte will not be modified. |
| 759 | func unsafeString(b []byte) string { |
| 760 | return *(*string)(unsafe.Pointer(&b)) |
| 761 | } |
| 762 | |
| 763 | // DecodeUnsafeStringAscending decodes a string value from the input buffer which was |
| 764 | // encoded using EncodeString or EncodeBytes. The r []byte is used as a |
no outgoing calls
no test coverage detected
searching dependent graphs…