- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 86 for dtoi (0.06 sec)
-
src/net/interface_plan9.go
} fields := getFields(line) if len(fields) < 4 { return nil, errors.New("invalid interface status file: " + ifcstat) } device := fields[1] mtustr := fields[3] mtu, _, ok := dtoi(mtustr) if !ok { return nil, errors.New("invalid status file of interface: " + ifcstat) } ifc.MTU = mtu // Not a loopback device ("/dev/null") or packet interface (e.g. "pkt2")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 14:00:54 UTC 2024 - 4.7K bytes - Viewed (0) -
src/net/dnsconfig_unix.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 02 22:14:43 UTC 2024 - 4.1K bytes - Viewed (0) -
src/net/port_unix.go
if i := bytealg.IndexByteString(line, '#'); i >= 0 { line = line[:i] } f := getFields(line) if len(f) < 2 { continue } portnet := f[1] // "80/tcp" port, j, ok := dtoi(portnet) if !ok || port <= 0 || j >= len(portnet) || portnet[j] != '/' { continue } netw := portnet[j+1:] // "tcp" m, ok1 := services[netw] if !ok1 { m = make(map[string]int) services[netw] = m
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 1.2K bytes - Viewed (0) -
src/net/parse_test.go
off int ok bool }{ {"", 0, 0, false}, {"0", 0, 1, true}, {"65536", 65536, 5, true}, {"123456789", big, 8, false}, {"-0", 0, 0, false}, {"-1234", 0, 0, false}, } { n, i, ok := dtoi(tt.in) if n != tt.out || i != tt.off || ok != tt.ok { t.Errorf("got %d, %d, %v; want %d, %d, %v", n, i, ok, tt.out, tt.off, tt.ok) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Feb 24 00:04:48 UTC 2024 - 1.6K bytes - Viewed (0) -
src/net/lookup_unix.go
// tcp 6 TCP # transmission control protocol if i := bytealg.IndexByteString(line, '#'); i >= 0 { line = line[0:i] } f := getFields(line) if len(f) < 2 { continue } if proto, _, ok := dtoi(f[1]); ok { if _, ok := protocols[f[0]]; !ok { protocols[f[0]] = proto } for _, alias := range f[2:] { if _, ok := protocols[alias]; !ok { protocols[alias] = proto } } } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 17:20:52 UTC 2023 - 3.3K bytes - Viewed (0) -
src/net/lookup_windows_test.go
rx := regexp.MustCompile(`(?m)^([a-z0-9.\-]+)\s+mail exchanger\s*=\s*([0-9]+)\s*([a-z0-9.\-]+)$`) for _, ans := range rx.FindAllStringSubmatch(r, -1) { pref, _, _ := dtoi(ans[2]) mx = append(mx, &MX{absDomainName(ans[3]), uint16(pref)}) } // windows nslookup syntax // gmail.com MX preference = 30, mail exchanger = alt3.gmail-smtp-in.l.google.com
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 8.7K bytes - Viewed (0) -
src/net/parse.go
// Bigger than we need, not too big to worry about overflow const big = 0xFFFFFF // Decimal to integer. // Returns number, characters consumed, success. func dtoi(s string) (n int, i int, ok bool) { n = 0 for i = 0; i < len(s) && '0' <= s[i] && s[i] <= '9'; i++ { n = n*10 + int(s[i]-'0') if n >= big { return big, i, false } } if i == 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 14:00:54 UTC 2024 - 5.7K bytes - Viewed (0) -
src/net/ipsock_plan9.go
i := bytealg.IndexByteString(s, '!') if i >= 0 { addr = ParseIP(s[:i]) if addr == nil { return nil, 0, &ParseError{Type: "IP address", Text: s} } } p, plen, ok := dtoi(s[i+1:]) if !ok { return nil, 0, &ParseError{Type: "port", Text: s} } if p < 0 || p > 0xFFFF { return nil, 0, &AddrError{Err: "invalid port", Addr: s[i+1 : i+1+plen]} } return addr, p, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 29 20:38:53 UTC 2023 - 7.5K bytes - Viewed (0) -
src/net/interface.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:53 UTC 2024 - 7.6K bytes - Viewed (0) -
src/strconv/atoi.go
return -int64(cutoff), rangeError(fnParseInt, s0) } n := int64(un) if neg { n = -n } return n, nil } // Atoi is equivalent to ParseInt(s, 10, 0), converted to type int. func Atoi(s string) (int, error) { const fnAtoi = "Atoi" sLen := len(s) if intSize == 32 && (0 < sLen && sLen < 10) || intSize == 64 && (0 < sLen && sLen < 19) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun May 05 00:24:26 UTC 2024 - 8.3K bytes - Viewed (0)