UnsafeConvertBytesToString 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
(b []byte)
| 993 | // careful to use this method only in situations in which the []byte will not |
| 994 | // be modified. |
| 995 | func UnsafeConvertBytesToString(b []byte) string { |
| 996 | return *(*string)(unsafe.Pointer(&b)) |
| 997 | } |
| 998 | |
| 999 | // DecodeUnsafeStringAscending decodes a string value from the input buffer which was |
| 1000 | // encoded using EncodeString or EncodeBytes. The r []byte is used as a |
no outgoing calls
no test coverage detected
searching dependent graphs…