Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for MaxLen (0.08 sec)

  1. src/syscall/syscall_windows.go

    // using WTF-8 instead of UTF-8 encoding.
    func UTF16ToString(s []uint16) string {
    	maxLen := 0
    	for i, v := range s {
    		if v == 0 {
    			s = s[0:i]
    			break
    		}
    		switch {
    		case v <= rune1Max:
    			maxLen += 1
    		case v <= rune2Max:
    			maxLen += 2
    		default:
    			// r is a non-surrogate that decodes to 3 bytes,
    			// or is an unpaired surrogate (also 3 bytes in WTF-8),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 11:49:46 UTC 2024
    - 52.7K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/elf.go

    		return
    	}
    
    	if !strings.HasPrefix(val, "0x") {
    		Exitf("-B argument must start with 0x: %s", val)
    	}
    
    	ov := val
    	val = val[2:]
    
    	const maxLen = 32
    	if hex.DecodedLen(len(val)) > maxLen {
    		Exitf("-B option too long (max %d digits): %s", maxLen, ov)
    	}
    
    	b, err := hex.DecodeString(val)
    	if err != nil {
    		if err == hex.ErrLength {
    			Exitf("-B argument must have even number of digits: %s", ov)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 13:29:54 UTC 2024
    - 63.6K bytes
    - Viewed (0)
Back to top