ParseDByte parses a string representation of hex encoded binary data. It supports both the hex format, with "\x" followed by a string of hexadecimal digits (the "\x" prefix occurs just once at the beginning), and the escaped format, which supports "\\" and octal escapes.
(s string)
| 319 | // the beginning), and the escaped format, which supports "\\" and |
| 320 | // octal escapes. |
| 321 | func ParseDByte(s string) (*DBytes, error) { |
| 322 | res, err := lex.DecodeRawBytesToByteArrayAuto([]byte(s)) |
| 323 | if err != nil { |
| 324 | return nil, makeParseError(s, types.Bytes, err) |
| 325 | } |
| 326 | return NewDBytes(DBytes(res)), nil |
| 327 | } |
| 328 | |
| 329 | // ParseDUuidFromString parses and returns the *DUuid Datum value represented |
| 330 | // by the provided input string, or an error. |
no test coverage detected
searching dependent graphs…