Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 110 for indexByte (0.26 sec)

  1. src/bufio/bufio.go

    // ReadSlice returns err != nil if and only if line does not end in delim.
    func (b *Reader) ReadSlice(delim byte) (line []byte, err error) {
    	s := 0 // search start index
    	for {
    		// Search buffer.
    		if i := bytes.IndexByte(b.buf[b.r+s:b.w], delim); i >= 0 {
    			i += s
    			line = b.buf[b.r : b.r+i+1]
    			b.r += i + 1
    			break
    		}
    
    		// Pending error?
    		if b.err != nil {
    			line = b.buf[b.r:b.w]
    			b.r = b.w
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 14:39:08 UTC 2023
    - 21.8K bytes
    - Viewed (0)
  2. src/encoding/xml/marshal.go

    			}
    		}
    	}
    	if start.Name.Local == "" && finfo != nil {
    		start.Name.Space, start.Name.Local = finfo.xmlns, finfo.name
    	}
    	if start.Name.Local == "" {
    		name := typ.Name()
    		if i := strings.IndexByte(name, '['); i >= 0 {
    			// Truncate generic instantiation name. See issue 48318.
    			name = name[:i]
    		}
    		if name == "" {
    			return &UnsupportedTypeError{typ}
    		}
    		start.Name.Local = name
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  3. cmd/encryption-v1.go

    // fail.
    func DecryptETag(key crypto.ObjectKey, object ObjectInfo) (string, error) {
    	if n := strings.Count(object.ETag, "-"); n > 0 {
    		if n != 1 {
    			return "", errObjectTampered
    		}
    		i := strings.IndexByte(object.ETag, '-')
    		if len(object.ETag[:i]) != 32 {
    			return "", errObjectTampered
    		}
    		if _, err := hex.DecodeString(object.ETag[:32]); err != nil {
    			return "", errObjectTampered
    		}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 06:56:12 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  4. src/go/constant/value.go

    	// proceed if f doesn't underflow to 0 or overflow to inf.
    	if x, _ := f.Float64(); f.Sign() == 0 == (x == 0) && !math.IsInf(x, 0) {
    		s := fmt.Sprintf("%.6g", x)
    		if !f.IsInt() && strings.IndexByte(s, '.') < 0 {
    			// f is not an integer, but its string representation
    			// doesn't reflect that. Use more digits. See issue 56220.
    			s = fmt.Sprintf("%g", x)
    		}
    		return s
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 34K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/testshared/shared_test.go

    		// (Content ID in the new content-based build IDs.)
    		const marker = `build id "`
    		i := bytes.Index(data, []byte(marker))
    		if i < 0 {
    			t.Fatal("cannot find build id in archive")
    		}
    		j := bytes.IndexByte(data[i+len(marker):], '"')
    		if j < 0 {
    			t.Fatal("cannot find build id in archive")
    		}
    		i += len(marker) + j - 1
    		if data[i] == 'a' {
    			data[i] = 'b'
    		} else {
    			data[i] = 'a'
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Aug 26 01:54:41 UTC 2023
    - 36.3K bytes
    - Viewed (0)
  6. src/regexp/regexp.go

    // with the replacement text repl.
    // Inside repl, $ signs are interpreted as in [Regexp.Expand].
    func (re *Regexp) ReplaceAll(src, repl []byte) []byte {
    	n := 2
    	if bytes.IndexByte(repl, '$') >= 0 {
    		n = 2 * (re.numSubexp + 1)
    	}
    	srepl := ""
    	b := re.replaceAll(src, "", n, func(dst []byte, match []int) []byte {
    		if len(srepl) != len(repl) {
    			srepl = string(repl)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:50:01 UTC 2024
    - 38.5K bytes
    - Viewed (0)
  7. src/cmd/link/internal/ld/pe.go

    		// of uinptrs this function consumes. Store the argsize and discard
    		// the %n suffix if any.
    		m.argsize = -1
    		extName := ldr.SymExtname(s)
    		if i := strings.IndexByte(extName, '%'); i >= 0 {
    			var err error
    			m.argsize, err = strconv.Atoi(extName[i+1:])
    			if err != nil {
    				ctxt.Errorf(s, "failed to parse stdcall decoration: %v", err)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 19:01:27 UTC 2023
    - 48.8K bytes
    - Viewed (0)
  8. src/os/exec/exec.go

    		kv := env[n-1]
    
    		// Reject NUL in environment variables to prevent security issues (#56284);
    		// except on Plan 9, which uses NUL as os.PathListSeparator (#56544).
    		if !nulOK && strings.IndexByte(kv, 0) != -1 {
    			err = errors.New("exec: environment variable contains NUL")
    			continue
    		}
    
    		i := strings.Index(kv, "=")
    		if i == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:53 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  9. src/encoding/xml/xml.go

    			return ""
    		}
    		i += lenp + k + 1
    		if c := sub[lenp+k]; c == '\'' || c == '"' {
    			sep = c
    			break
    		}
    	}
    	if sep == 0 {
    		return ""
    	}
    	j := strings.IndexByte(s[i:], sep)
    	if j < 0 {
    		return ""
    	}
    	return s[i : i+j]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 47.3K bytes
    - Viewed (0)
  10. src/encoding/json/decode_test.go

    }
    
    // needed for re-marshaling tests
    func (u unmarshalerText) MarshalText() ([]byte, error) {
    	return []byte(u.A + ":" + u.B), nil
    }
    
    func (u *unmarshalerText) UnmarshalText(b []byte) error {
    	pos := bytes.IndexByte(b, ':')
    	if pos == -1 {
    		return errors.New("missing separator")
    	}
    	u.A, u.B = string(b[:pos]), string(b[pos+1:])
    	return nil
    }
    
    var _ encoding.TextUnmarshaler = (*unmarshalerText)(nil)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 16:40:14 UTC 2024
    - 67.6K bytes
    - Viewed (0)
Back to top