Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 110 for indexByte (0.69 sec)

  1. src/cmd/vendor/golang.org/x/text/internal/language/language.go

    // string.
    func (t Tag) TypeForKey(key string) string {
    	if _, start, end, _ := t.findTypeForKey(key); end != start {
    		s := t.str[start:end]
    		if p := strings.IndexByte(s, '-'); p >= 0 {
    			s = s[:p]
    		}
    		return s
    	}
    	return ""
    }
    
    var (
    	errPrivateUse       = errors.New("cannot set a key on a private use tag")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 16.8K bytes
    - Viewed (0)
  2. src/cmd/go/internal/envcmd/env.go

    			}
    			if onlyChanged && !e.Changed {
    				continue
    			}
    			switch runtime.GOOS {
    			default:
    				fmt.Fprintf(w, "%s=%s\n", e.Name, shellQuote(e.Value))
    			case "plan9":
    				if strings.IndexByte(e.Value, '\x00') < 0 {
    					fmt.Fprintf(w, "%s='%s'\n", e.Name, strings.ReplaceAll(e.Value, "'", "''"))
    				} else {
    					v := strings.Split(e.Value, "\x00")
    					fmt.Fprintf(w, "%s=(", e.Name)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 17:13:51 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  3. src/go/build/build.go

    		}
    		shouldBuild = ctxt.eval(x, allTags)
    
    	default:
    		shouldBuild = true
    		p := content
    		for len(p) > 0 {
    			line := p
    			if i := bytes.IndexByte(line, '\n'); i >= 0 {
    				line, p = line[:i], p[i+1:]
    			} else {
    				p = p[len(p):]
    			}
    			line = bytes.TrimSpace(line)
    			if !bytes.HasPrefix(line, slashSlash) || !bytes.Contains(line, plusBuild) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62.3K bytes
    - Viewed (0)
  4. src/debug/macho/file.go

    					rel.Type = uint8(ri.Symnum & (1<<4 - 1))
    				default:
    					panic("unreachable")
    				}
    			}
    		}
    	}
    
    	return nil
    }
    
    func cstring(b []byte) string {
    	i := bytes.IndexByte(b, 0)
    	if i == -1 {
    		i = len(b)
    	}
    	return string(b[0:i])
    }
    
    // Segment returns the first Segment with the given name, or nil if no such segment exists.
    func (f *File) Segment(name string) *Segment {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 17.9K bytes
    - Viewed (0)
  5. src/vendor/golang.org/x/net/idna/idna10.0.0.go

    	if l.slice != nil {
    		return strings.Join(l.slice, ".")
    	}
    	return l.orig
    }
    
    func (l *labelIter) label() string {
    	if l.slice != nil {
    		return l.slice[l.i]
    	}
    	p := strings.IndexByte(l.orig[l.curStart:], '.')
    	l.curEnd = l.curStart + p
    	if p == -1 {
    		l.curEnd = len(l.orig)
    	}
    	return l.orig[l.curStart:l.curEnd]
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 20.9K bytes
    - Viewed (0)
  6. src/net/textproto/reader.go

    // mustHaveFieldNameColon ensures that, per RFC 7230, the
    // field-name is on a single line, so the first line must
    // contain a colon.
    func mustHaveFieldNameColon(line []byte) error {
    	if bytes.IndexByte(line, ':') < 0 {
    		return ProtocolError(fmt.Sprintf("malformed MIME header: missing colon: %q", line))
    	}
    	return nil
    }
    
    var nl = []byte("\n")
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 22.1K bytes
    - Viewed (0)
  7. src/cmd/vendor/rsc.io/markdown/inline.go

    	return p.list
    }
    
    func (ps *parseState) emph(dst, src []Inline) []Inline {
    	const chars = "_*~\"'"
    	var stack [len(chars)][]*emphPlain
    	stackOf := func(c byte) int {
    		return strings.IndexByte(chars, c)
    	}
    
    	trimStack := func() {
    		for i := range stack {
    			stk := &stack[i]
    			for len(*stk) > 0 && (*stk)[len(*stk)-1].i >= len(dst) {
    				*stk = (*stk)[:len(*stk)-1]
    			}
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/mod/modfile/read.go

    // It is tolerant of unrelated problems in the go.mod file.
    func ModulePath(mod []byte) string {
    	for len(mod) > 0 {
    		line := mod
    		mod = nil
    		if i := bytes.IndexByte(line, '\n'); i >= 0 {
    			line, mod = line[:i], line[i+1:]
    		}
    		if i := bytes.Index(line, slashSlash); i >= 0 {
    			line = line[:i]
    		}
    		line = bytes.TrimSpace(line)
    		if !bytes.HasPrefix(line, moduleStr) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/types/objectpath/objectpath.go

    func Object(pkg *types.Package, p Path) (types.Object, error) {
    	pathstr := string(p)
    	if pathstr == "" {
    		return nil, fmt.Errorf("empty path")
    	}
    
    	var pkgobj, suffix string
    	if dot := strings.IndexByte(pathstr, opType); dot < 0 {
    		pkgobj = pathstr
    	} else {
    		pkgobj = pathstr[:dot]
    		suffix = pathstr[dot:] // suffix starts with "."
    	}
    
    	obj := pkg.Scope().Lookup(pkgobj)
    	if obj == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/term/terminal.go

    		line = line[todo:]
    	}
    }
    
    // writeWithCRLF writes buf to w but replaces all occurrences of \n with \r\n.
    func writeWithCRLF(w io.Writer, buf []byte) (n int, err error) {
    	for len(buf) > 0 {
    		i := bytes.IndexByte(buf, '\n')
    		todo := len(buf)
    		if i >= 0 {
    			todo = i
    		}
    
    		var nn int
    		nn, err = w.Write(buf[:todo])
    		n += nn
    		if err != nil {
    			return n, err
    		}
    		buf = buf[todo:]
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 22 17:16:14 UTC 2022
    - 22.5K bytes
    - Viewed (0)
Back to top