code: func Unescape(in, out []byte) ([]byte, error) {
  	firstBackslash := bytes.IndexByte(in, '\\')
  	if firstBackslash == -1 {
  		return in, nil
  	}
  
  	// Get a buffer of sufficient size (allocate if needed)
  	if cap(out) < len(in) {
  		out = make([]byte, len(in))
  	} else {
  		out = out[0:len(in)]
  	}
  
  	// Copy the first sequence of unescaped bytes to the output and obtain a buffer pointer (subslice)
  	copy(out, in[:firstBackslash])
  	in = in[firstBackslash:]
  	buf := out[firstBackslash:]
  
  	for len(in) > 0 {
  		// Unescape the next escaped character
  		inLen, bufLen := unescapeToUTF8(in, buf)
  		if inLen == -1 {
  			return nil, MalformedStringEscapeError
  		}
  
  		in = in[inLen:]
  		buf = buf[bufLen:]
  
  		// Copy everything up until the next backslash
  		nextBackslash := bytes.IndexByte(in, '\\')
  		if nextBackslash == -1 {
  			copy(buf, in)
  			buf = buf[len(in):]
  			break
  		} else {
  			copy(buf, in[:nextBackslash])
  			buf = buf[nextBackslash:]
  			in = in[nextBackslash:]
  		}
  	}
  
  	// Trim the out buffer to the amount that was actually emitted
  	return out[:len(out)-len(buf)], nil
  }
docs: // unescape unescapes the string contained in 'in' and returns it as a slice.
  // If 'in' contains no escaped characters:
  //   Returns 'in'.
  // Else, if 'out' is of sufficient capacity (guaranteed if cap(out) >= len(in)):
  //   'out' is used to build the unescaped string and is returned with no extra allocation
  // Else:
  //   A new slice is allocated and returned.