Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 153 for if (0.18 sec)

  1. src/bytes/bytes.go

    // there is no code point in common.
    func LastIndexAny(s []byte, chars string) int {
    	if chars == "" {
    		// Avoid scanning all of s.
    		return -1
    	}
    	if len(s) > 8 {
    		if as, isASCII := makeASCIISet(chars); isASCII {
    			for i := len(s) - 1; i >= 0; i-- {
    				if as.contains(s[i]) {
    					return i
    				}
    			}
    			return -1
    		}
    	}
    	if len(s) == 1 {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  2. src/archive/zip/zip_test.go

    	for i := 0; i < chunks; i++ {
    		_, err := io.ReadFull(rc, chunk)
    		if err != nil {
    			t.Fatal("read:", err)
    		}
    	}
    	if frag := int(size % chunkSize); frag > 0 {
    		_, err := io.ReadFull(rc, chunk[:frag])
    		if err != nil {
    			t.Fatal("read:", err)
    		}
    	}
    	gotEnd, err := io.ReadAll(rc)
    	if err != nil {
    		t.Fatal("read end:", err)
    	}
    	if !bytes.Equal(gotEnd, end) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/asm/parse.go

    		tok := p.next()
    		if tok.ScanToken == scanner.EOF {
    			p.errorf("missing right parenthesis")
    			return
    		}
    		rname := tok.String()
    		p.back()
    		haveConstant = !p.atStartOfRegister(rname)
    		if !haveConstant {
    			p.back() // Put back the '('.
    		}
    	}
    	if haveConstant {
    		p.back()
    		if p.have(scanner.Float) {
    			if prefix != '$' {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Feb 21 14:34:57 GMT 2024
    - 36.9K bytes
    - Viewed (0)
  4. src/cmd/asm/internal/lex/input.go

    	name := in.macroName()
    	in.expectNewline("#if[n]def")
    	if !in.enabled() {
    		truth = false
    	} else if _, defined := in.macros[name]; !defined {
    		truth = !truth
    	}
    	in.ifdefStack = append(in.ifdefStack, truth)
    }
    
    // #else processing
    func (in *Input) else_() {
    	in.expectNewline("#else")
    	if len(in.ifdefStack) == 0 {
    		in.Error("unmatched #else")
    	}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Aug 29 07:48:38 GMT 2023
    - 12.6K bytes
    - Viewed (0)
  5. src/archive/tar/writer.go

    	// Use long-link files if Name or Linkname exceeds the field size.
    	const longName = "././@LongLink"
    	if len(hdr.Name) > nameSize {
    		data := hdr.Name + "\x00"
    		if err := tw.writeRawFile(longName, data, TypeGNULongName, FormatGNU); err != nil {
    			return err
    		}
    	}
    	if len(hdr.Linkname) > nameSize {
    		data := hdr.Linkname + "\x00"
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  6. src/bytes/reader_test.go

    		n, err := r.Read(buf)
    		if err != tt.readerr {
    			t.Errorf("%d. read = %v; want %v", i, err, tt.readerr)
    			continue
    		}
    		got := string(buf[:n])
    		if got != tt.want {
    			t.Errorf("%d. got %q; want %q", i, got, tt.want)
    		}
    	}
    }
    
    func TestReadAfterBigSeek(t *testing.T) {
    	r := NewReader([]byte("0123456789"))
    	if _, err := r.Seek(1<<31+5, io.SeekStart); err != nil {
    		t.Fatal(err)
    	}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
  7. src/bytes/reader.go

    	if off >= int64(len(r.s)) {
    		return 0, io.EOF
    	}
    	n = copy(b, r.s[off:])
    	if n < len(b) {
    		err = io.EOF
    	}
    	return
    }
    
    // ReadByte implements the [io.ByteReader] interface.
    func (r *Reader) ReadByte() (byte, error) {
    	r.prevRune = -1
    	if r.i >= int64(len(r.s)) {
    		return 0, io.EOF
    	}
    	b := r.s[r.i]
    	r.i++
    	return b, nil
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/test/callback_windows.go

    		if (!FunctionEntry) {
    			// For simplicity, don't unwind leaf entries, which are not used in this test.
    			break;
    		} else {
    			RtlVirtualUnwind(0, ImageBase, ControlPc, FunctionEntry, &context, &HandlerData, &EstablisherFrame, NULL);
    		}
    
    		ControlPc = context.Rip;
    		// Check if we left the user range.
    		if (ControlPc < 0x10000) {
    			break;
    		}
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Nov 29 16:01:37 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  9. misc/ios/detect.go

    	lines := getLines(cmd)
    
    	var files []string
    	for _, line := range lines {
    		if len(line) == 0 {
    			continue
    		}
    		xmlLines := getLines(parseMobileProvision(string(line)))
    		matches := 0
    		for _, udid := range udids {
    			for _, xmlLine := range xmlLines {
    				if bytes.Contains(xmlLine, udid) {
    					matches++
    				}
    			}
    		}
    		if matches == len(udids) {
    			files = append(files, string(line))
    		}
    	}
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Oct 19 23:33:30 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  10. misc/chrome/gophertool/gopher.js

    var gerritChangeIdRE = /^I[0-9a-f]{4,40}$/; // e.g. Id69c00d908d18151486007ec03da5495b34b05f5
    var pkgRE = /^[a-z0-9_\/]+$/;
    
    function urlForInput(t) {
        if (!t) {
            return null;
        }
    
        if (numericRE.test(t)) {
            if (t < 150000) {
                // We could use the golang.org/cl/ handler here, but
                // avoid some redirect latency and go right there, since
    JavaScript
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Sat Jul 11 14:36:33 GMT 2015
    - 1.2K bytes
    - Viewed (0)
Back to top