Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 16 of 16 for indexByteString (0.19 sec)

  1. src/net/dnsconfig_unix.go

    		conf.search = dnsDefaultSearch()
    	}
    	return conf
    }
    
    func dnsDefaultSearch() []string {
    	hn, err := getHostname()
    	if err != nil {
    		// best effort
    		return nil
    	}
    	if i := bytealg.IndexByteString(hn, '.'); i >= 0 && i < len(hn)-1 {
    		return []string{ensureRooted(hn[i+1:])}
    	}
    	return nil
    }
    
    func ensureRooted(s string) string {
    	if len(s) > 0 && s[len(s)-1] == '.' {
    		return s
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 02 22:14:43 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. src/net/dnsclient.go

    // It's hard to tell so we settle on the heuristic that names without dots
    // (like "localhost" or "myhost") do not get trailing dots, but any other
    // names do.
    func absDomainName(s string) string {
    	if bytealg.IndexByteString(s, '.') != -1 && s[len(s)-1] != '.' {
    		s += "."
    	}
    	return s
    }
    
    // An SRV represents a single DNS SRV record.
    type SRV struct {
    	Target   string
    	Port     uint16
    	Priority uint16
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  3. src/internal/filepathlite/path_windows.go

    		switch path[i] {
    		case ':', '\\', 0:
    			return "", errInvalidPath
    		}
    	}
    	containsSlash := false
    	for p := path; p != ""; {
    		// Find the next path element.
    		var element string
    		i := bytealg.IndexByteString(p, '/')
    		if i < 0 {
    			element = p
    			p = ""
    		} else {
    			containsSlash = true
    			element = p[:i]
    			p = p[i+1:]
    		}
    		if isReservedName(element) {
    			return "", errInvalidPath
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:50 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  4. 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)
  5. src/runtime/traceback.go

    // concatenation.
    func funcNamePiecesForPrint(name string) (string, string, string) {
    	// Replace the shape name in generic function with "...".
    	i := bytealg.IndexByteString(name, '[')
    	if i < 0 {
    		return name, "", ""
    	}
    	j := len(name) - 1
    	for name[j] != ']' {
    		j--
    	}
    	if j <= i {
    		return name, "", ""
    	}
    	return name[:i], "[...]", name[j+1:]
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  6. 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)
Back to top