More BCE.

This commit is contained in:
Nuno Cruces
2024-09-30 11:03:50 +01:00
parent e59e2ed2a2
commit 8b6c2b28fb
8 changed files with 51 additions and 35 deletions

View File

@@ -62,8 +62,8 @@ func Quote(value any) string {
case []byte:
buf := make([]byte, 3+2*len(v))
buf[0] = 'x'
buf[1] = '\''
buf[0] = 'x'
i := 2
for _, b := range v {
const hex = "0123456789ABCDEF"
@@ -80,8 +80,8 @@ func Quote(value any) string {
}
buf := bytes.Repeat([]byte("0"), int(3+2*int64(v)))
buf[0] = 'x'
buf[1] = '\''
buf[0] = 'x'
buf[len(buf)-1] = '\''
return unsafe.String(&buf[0], len(buf))
}