Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for xtoi2 (0.13 sec)

  1. src/net/parse.go

    	}
    	return n, i, true
    }
    
    // xtoi2 converts the next two hex digits of s into a byte.
    // If s is longer than 2 bytes then the third byte must be e.
    // If the first two bytes of s are not hex digits or the third byte
    // does not match e, false is returned.
    func xtoi2(s string, e byte) (byte, bool) {
    	if len(s) > 2 && s[2] != e {
    		return 0, false
    	}
    	n, ei, ok := xtoi(s[:2])
    	return byte(n), ok && ei == 2
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  2. src/net/interface_plan9.go

    		}
    
    		if len(line) > 0 && len(line)%2 == 0 {
    			ifc.HardwareAddr = make([]byte, len(line)/2)
    			var ok bool
    			for i := range ifc.HardwareAddr {
    				j := (i + 1) * 2
    				ifc.HardwareAddr[i], ok = xtoi2(line[i*2:j], 0)
    				if !ok {
    					ifc.HardwareAddr = ifc.HardwareAddr[:i]
    					break
    				}
    			}
    		}
    
    		ifc.Flags = FlagUp | FlagRunning | FlagBroadcast | FlagMulticast
    	} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 4.7K bytes
    - Viewed (0)
Back to top