(n uint64)
| 503 | } |
| 504 | |
| 505 | func uint64ToString(n uint64) []byte { |
| 506 | var a [20]byte |
| 507 | i := 20 |
| 508 | |
| 509 | // U+0030 = 0 |
| 510 | // ... |
| 511 | // U+0039 = 9 |
| 512 | |
| 513 | var q uint64 |
| 514 | for n >= 10 { |
| 515 | i-- |
| 516 | q = n / 10 |
| 517 | a[i] = uint8(n-q*10) + 0x30 |
| 518 | n = q |
| 519 | } |
| 520 | |
| 521 | i-- |
| 522 | a[i] = uint8(n) + 0x30 |
| 523 | |
| 524 | return a[i:] |
| 525 | } |
| 526 | |
| 527 | // returns the string read as a bytes slice, whether the value is NULL, |
| 528 | // the number of bytes read and an error, in case the string is longer than |