diff options
Diffstat (limited to 'libgo/go/net/parse.go')
-rw-r--r-- | libgo/go/net/parse.go | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/libgo/go/net/parse.go b/libgo/go/net/parse.go index cdb35bb..6c230ab 100644 --- a/libgo/go/net/parse.go +++ b/libgo/go/net/parse.go @@ -172,32 +172,6 @@ func xtoi2(s string, e byte) (byte, bool) { return byte(n), ok && ei == 2 } -// Convert integer to decimal string. -func itoa(val int) string { - if val < 0 { - return "-" + uitoa(uint(-val)) - } - return uitoa(uint(val)) -} - -// Convert unsigned integer to decimal string. -func uitoa(val uint) string { - if val == 0 { // avoid string allocation - return "0" - } - var buf [20]byte // big enough for 64bit value base 10 - i := len(buf) - 1 - for val >= 10 { - q := val / 10 - buf[i] = byte('0' + val - q*10) - i-- - val = q - } - // val < 10 - buf[i] = byte('0' + val) - return string(buf[i:]) -} - // Convert i to a hexadecimal string. Leading zeros are not printed. func appendHex(dst []byte, i uint32) []byte { if i == 0 { |