DecodeUnsafeStringAscending decodes a string value from the input buffer which was encoded using EncodeString or EncodeBytes. The r []byte is used as a temporary buffer in order to avoid memory allocations. The remainder of the input buffer and the decoded string are returned. Note that the returned
(b []byte, r []byte)
| 1002 | // input buffer and the decoded string are returned. Note that the returned |
| 1003 | // string may share storage with the input buffer. |
| 1004 | func DecodeUnsafeStringAscending(b []byte, r []byte) ([]byte, string, error) { |
| 1005 | b, r, err := DecodeBytesAscending(b, r) |
| 1006 | return b, UnsafeConvertBytesToString(r), err |
| 1007 | } |
| 1008 | |
| 1009 | // DecodeUnsafeStringAscendingDeepCopy is the same as |
| 1010 | // DecodeUnsafeStringAscending but the returned string will never share storage |
no test coverage detected
searching dependent graphs…