Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for isHex (0.04 sec)

  1. src/mime/mediatype.go

    	// Count %, check that they're well-formed.
    	percents := 0
    	for i := 0; i < len(s); {
    		if s[i] != '%' {
    			i++
    			continue
    		}
    		percents++
    		if i+2 >= len(s) || !ishex(s[i+1]) || !ishex(s[i+2]) {
    			s = s[i:]
    			if len(s) > 3 {
    				s = s[0:3]
    			}
    			return "", fmt.Errorf("mime: bogus characters after %%: %q", s)
    		}
    		i += 3
    	}
    	if percents == 0 {
    		return s, nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.8K bytes
    - Viewed (0)
Back to top