Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for indexByteString (0.7 sec)

  1. src/net/parse.go

    	n := 0
    	for i := 0; i < len(s); i++ {
    		if bytealg.IndexByteString(t, s[i]) >= 0 {
    			n++
    		}
    	}
    	return n
    }
    
    // Split s at any bytes in t.
    func splitAtBytes(s string, t string) []string {
    	a := make([]string, 1+countAnyByte(s, t))
    	n := 0
    	last := 0
    	for i := 0; i < len(s); i++ {
    		if bytealg.IndexByteString(t, s[i]) >= 0 {
    			if last < i {
    				a[n] = s[last:i]
    				n++
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  2. src/net/ipsock.go

    	} else {
    		host = hostport[:i]
    		if bytealg.IndexByteString(host, ':') >= 0 {
    			return addrErr(hostport, tooManyColons)
    		}
    	}
    	if bytealg.IndexByteString(hostport[j:], '[') >= 0 {
    		return addrErr(hostport, "unexpected '[' in address")
    	}
    	if bytealg.IndexByteString(hostport[k:], ']') >= 0 {
    		return addrErr(hostport, "unexpected ']' in address")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  3. 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)
  4. src/internal/filepathlite/path_plan9.go

    func IsPathSeparator(c uint8) bool {
    	return Separator == c
    }
    
    func isLocal(path string) bool {
    	return unixIsLocal(path)
    }
    
    func localize(path string) (string, error) {
    	if path[0] == '#' || bytealg.IndexByteString(path, 0) >= 0 {
    		return "", errInvalidPath
    	}
    	return path, nil
    }
    
    // IsAbs reports whether the path is absolute.
    func IsAbs(path string) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:50 UTC 2024
    - 952 bytes
    - Viewed (0)
  5. src/internal/bytealg/indexbyte_loong64.s

    	ADDV	$-1, R4
    
    	PCALIGN	$16
    loop:
    	ADDV	$1, R4
    	BEQ	R4, R5, notfound
    	MOVBU	(R4), R8
    	BNE	R7, R8, loop
    
    	SUBV	R6, R4		// remove base
    	RET
    
    notfound:
    	MOVV	$-1, R4
    	RET
    
    TEXT ยทIndexByteString<ABIInternal>(SB),NOSPLIT,$0-32
    	// R4 = s_base
    	// R5 = s_len
    	// R6 = byte to find
    	MOVV	R4, R7		// store base for later
    	ADDV	R4, R5		// end
    	ADDV	$-1, R4
    
    	PCALIGN	$16
    loop:
    	ADDV	$1, R4
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 15:04:25 UTC 2024
    - 905 bytes
    - Viewed (0)
  6. src/internal/filepathlite/path_unix.go

    )
    
    func IsPathSeparator(c uint8) bool {
    	return Separator == c
    }
    
    func isLocal(path string) bool {
    	return unixIsLocal(path)
    }
    
    func localize(path string) (string, error) {
    	if bytealg.IndexByteString(path, 0) >= 0 {
    		return "", errInvalidPath
    	}
    	return path, nil
    }
    
    // IsAbs reports whether the path is absolute.
    func IsAbs(path string) bool {
    	return stringslite.HasPrefix(path, "/")
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:50 UTC 2024
    - 935 bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. src/internal/stringslite/strings.go

    }
    
    func HasSuffix(s, suffix string) bool {
    	return len(s) >= len(suffix) && s[len(s)-len(suffix):] == suffix
    }
    
    func IndexByte(s string, c byte) int {
    	return bytealg.IndexByteString(s, c)
    }
    
    func Index(s, substr string) int {
    	n := len(substr)
    	switch {
    	case n == 0:
    		return 0
    	case n == 1:
    		return IndexByte(s, substr[0])
    	case n == len(s):
    		if substr == s {
    			return 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 04 01:23:42 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  10. 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)
Back to top