Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for indexByteString (0.33 sec)

  1. src/internal/bytealg/indexbyte_generic.go

    // Copyright 2018 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Avoid IndexByte and IndexByteString on Plan 9 because it uses
    // SSE instructions on x86 machines, and those are classified as
    // floating point instructions, which are illegal in a note handler.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 17:30:15 UTC 2023
    - 776 bytes
    - Viewed (0)
  2. src/net/nss.go

    		if len(line) == 0 {
    			continue
    		}
    		colon := bytealg.IndexByteString(line, ':')
    		if colon == -1 {
    			conf.err = errors.New("no colon on line")
    			return conf
    		}
    		db := trimSpace(line[:colon])
    		srcs := line[colon+1:]
    		for {
    			srcs = trimSpace(srcs)
    			if len(srcs) == 0 {
    				break
    			}
    			sp := bytealg.IndexByteString(srcs, ' ')
    			var src string
    			if sp == -1 {
    				src = srcs
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:15:51 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  3. test/fixedbugs/issue24419.go

    import (
    	"bytes"
    	"strings"
    )
    
    func growstack(n int) {
    	if n > 0 {
    		growstack(n - 1)
    	}
    }
    
    func main() {
    	c := make(chan struct{})
    	go compare(c)
    	go equal(c)
    	go indexByte(c)
    	go indexByteString(c)
    	<-c
    	<-c
    	<-c
    	<-c
    }
    
    func compare(c chan struct{}) {
    	defer bytes.Compare(nil, nil)
    	growstack(10000)
    	c <- struct{}{}
    }
    func equal(c chan struct{}) {
    	defer bytes.Equal(nil, nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 10 17:13:53 UTC 2018
    - 813 bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. src/strconv/bytealg.go

    //go:build !compiler_bootstrap
    
    package strconv
    
    import "internal/bytealg"
    
    // index returns the index of the first instance of c in s, or -1 if missing.
    func index(s string, c byte) int {
    	return bytealg.IndexByteString(s, c)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:27 UTC 2023
    - 389 bytes
    - Viewed (0)
  7. src/internal/bytealg/indexbyte_native.go

    package bytealg
    
    //go:noescape
    func IndexByte(b []byte, c byte) int
    
    //go:noescape
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 17:30:15 UTC 2023
    - 438 bytes
    - Viewed (0)
  8. src/internal/bytealg/indexbyte_386.s

    	MOVL	b_len+4(FP), CX
    	MOVB	c+12(FP), AL
    	MOVL	SI, DI
    	CLD; REPN; SCASB
    	JZ 3(PC)
    	MOVL	$-1, ret+16(FP)
    	RET
    	SUBL	SI, DI
    	SUBL	$1, DI
    	MOVL	DI, ret+16(FP)
    	RET
    
    TEXT ยทIndexByteString(SB),NOSPLIT,$0-16
    	MOVL	s_base+0(FP), SI
    	MOVL	s_len+4(FP), CX
    	MOVB	c+8(FP), AL
    	MOVL	SI, DI
    	CLD; REPN; SCASB
    	JZ 3(PC)
    	MOVL	$-1, ret+12(FP)
    	RET
    	SUBL	SI, DI
    	SUBL	$1, DI
    	MOVL	DI, ret+12(FP)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 08 20:52:47 UTC 2018
    - 647 bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top