- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for indexByteString (0.4 sec)
-
src/net/lookup_plan9.go
} if len(lines) == 0 { return 0, UnknownNetworkError(name) } f := getFields(lines[0]) if len(f) < 2 { return 0, UnknownNetworkError(name) } s := f[1] if n, _, ok := dtoi(s[bytealg.IndexByteString(s, '=')+1:]); ok { return n, nil } return 0, UnknownNetworkError(name) } func (*Resolver) lookupHost(ctx context.Context, host string) (addrs []string, err error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 17:08:38 UTC 2024 - 9.9K bytes - Viewed (0) -
src/runtime/string.go
offset := 0 ptr := unsafe.Pointer(s) // IndexByteString uses wide reads, so we need to be careful // with page boundaries. Call IndexByteString on // [ptr, endOfPage) interval. safeLen := int(pageSize - uintptr(ptr)%pageSize) for { t := *(*string)(unsafe.Pointer(&stringStruct{ptr, safeLen})) // Check one page at a time. if i := bytealg.IndexByteString(t, 0); i != -1 { return offset + i }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:17:26 UTC 2024 - 13.4K bytes - Viewed (0) -
src/runtime/error.go
// Do it by finding the parens. i := bytealg.IndexByteString(name, '(') if i < 0 { throw("panicwrap: no ( in " + name) } pkg := name[:i-1] if i+2 >= len(name) || name[i-1:i+2] != ".(*" { throw("panicwrap: unexpected string after package name: " + name) } name = name[i+2:] i = bytealg.IndexByteString(name, ')') if i < 0 { throw("panicwrap: no ) in " + name) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 19:10:41 UTC 2024 - 9.9K bytes - Viewed (0) -
src/net/conf.go
// Given a choice, we prefer the cgo resolver. return hostLookupCgo, nil } else { // Neither resolver was explicitly requested // and we have no preference. if bytealg.IndexByteString(hostname, '\\') != -1 || bytealg.IndexByteString(hostname, '%') != -1 { // Don't deal with special form hostnames // with backslashes or '%'. return hostLookupCgo, nil } // If something is unrecognized, use cgo.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 18 03:13:26 UTC 2024 - 15.5K bytes - Viewed (0) -
src/runtime/runtime1.go
func parsegodebug(godebug string, seen map[string]bool) { for p := godebug; p != ""; { var field string if seen == nil { // startup: process left to right, overwriting older settings with newer i := bytealg.IndexByteString(p, ',') if i < 0 { field, p = p, "" } else { field, p = p[:i], p[i+1:] } } else { // incremental update: process right to left, updating and skipping seen i := len(p) - 1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:52:17 UTC 2024 - 19.3K bytes - Viewed (0) -
src/syscall/exec_windows.go
func createEnvBlock(envv []string) ([]uint16, error) { if len(envv) == 0 { return utf16.Encode([]rune("\x00\x00")), nil } var length int for _, s := range envv { if bytealg.IndexByteString(s, 0) != -1 { return nil, EINVAL } length += len(s) + 1 } length += 1 b := make([]uint16, 0, length) for _, s := range envv { for _, c := range s { b = utf16.AppendRune(b, c)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 28 18:29:48 UTC 2023 - 10.3K bytes - Viewed (0) -
src/net/netip/netip.go
// of the string, but trying to handle it inline makes a bunch of // other inner loop conditionals more expensive, and it ends up // being slower. zone := "" i := bytealg.IndexByteString(s, '%') if i != -1 { s, zone = s[:i], s[i+1:] if zone == "" { // Not allowed to have an empty zone if explicitly specified. return Addr{}, parseAddrError{in: in, msg: "zone must be a non-empty string"}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 17:10:01 UTC 2024 - 43.2K bytes - Viewed (0)