bytesToOctets converts byte sequences to a string using a three digit octal encoded value per byte.
(byteVal []byte)
| 529 | // bytesToOctets converts byte sequences to a string using a three digit octal encoded value |
| 530 | // per byte. |
| 531 | func bytesToOctets(byteVal []byte) string { |
| 532 | var b strings.Builder |
| 533 | for _, c := range byteVal { |
| 534 | fmt.Fprintf(&b, "\\%03o", c) |
| 535 | } |
| 536 | return b.String() |
| 537 | } |
| 538 | |
| 539 | // writeOperatorWithWrapping outputs the operator and inserts a newline for operators configured |
| 540 | // in the unparser options. |