Skip to content
Snippets Groups Projects
Select Git revision
  • 1f9521b8c915913432bcad409494eb6b3f102c8c
  • noblogs default
  • noblogs-5.7.1
  • upstream
  • noblogs-5.7
  • noblogs-5.6new
  • upstream5.5.1
  • noblogs28dic
  • upstream28dic
  • noblogs-5.5.1
  • noblogs-5.4.2
  • noblogs-5.4_seconda
  • noblogs-5.4
  • noblogs-7c
  • wp5.2.3p3
  • mergedbconf
  • noblogs-5.7.1
  • noblogs.5.7.0p1
  • noblogs-5.7.0
  • noblogs-5.6p3
  • noblogs5.6p2
  • noblogs-5.6p1
  • noblogs-5.6
  • noblogs-5.4.2p1
  • noblogs-5.4.2
  • noblogs-5.4.1
  • noblogs-5.4
  • noblogs-p5.4
  • noblogs-5.3.2p2
  • noblogs-5.3.2p1
  • noblogs-5.3.2
  • noblogs-5.3
  • noblogs-5.2.3p4
  • noblogs-5.2.3p3
  • noblogs-5.2.3p2
  • noblogs-5.2.3p1
36 results

class-wp-http-requests-hooks.php

Blame
  • tables10.0.0.go 110.90 KiB
    // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
    
    // +build go1.10
    
    package bidi
    
    // UnicodeVersion is the Unicode version from which the tables in this package are derived.
    const UnicodeVersion = "10.0.0"
    
    // xorMasks contains masks to be xor-ed with brackets to get the reverse
    // version.
    var xorMasks = []int32{ // 8 elements
    	0, 1, 6, 7, 3, 15, 29, 63,
    } // Size: 56 bytes
    
    // lookup returns the trie value for the first UTF-8 encoding in s and
    // the width in bytes of this encoding. The size will be 0 if s does not
    // hold enough bytes to complete the encoding. len(s) must be greater than 0.
    func (t *bidiTrie) lookup(s []byte) (v uint8, sz int) {
    	c0 := s[0]
    	switch {
    	case c0 < 0x80: // is ASCII
    		return bidiValues[c0], 1
    	case c0 < 0xC2:
    		return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
    	case c0 < 0xE0: // 2-byte UTF-8
    		if len(s) < 2 {
    			return 0, 0
    		}
    		i := bidiIndex[c0]
    		c1 := s[1]
    		if c1 < 0x80 || 0xC0 <= c1 {
    			return 0, 1 // Illegal UTF-8: not a continuation byte.
    		}
    		return t.lookupValue(uint32(i), c1), 2
    	case c0 < 0xF0: // 3-byte UTF-8
    		if len(s) < 3 {
    			return 0, 0
    		}
    		i := bidiIndex[c0]
    		c1 := s[1]
    		if c1 < 0x80 || 0xC0 <= c1 {
    			return 0, 1 // Illegal UTF-8: not a continuation byte.
    		}
    		o := uint32(i)<<6 + uint32(c1)
    		i = bidiIndex[o]
    		c2 := s[2]
    		if c2 < 0x80 || 0xC0 <= c2 {
    			return 0, 2 // Illegal UTF-8: not a continuation byte.
    		}
    		return t.lookupValue(uint32(i), c2), 3
    	case c0 < 0xF8: // 4-byte UTF-8
    		if len(s) < 4 {
    			return 0, 0
    		}
    		i := bidiIndex[c0]
    		c1 := s[1]
    		if c1 < 0x80 || 0xC0 <= c1 {
    			return 0, 1 // Illegal UTF-8: not a continuation byte.
    		}
    		o := uint32(i)<<6 + uint32(c1)
    		i = bidiIndex[o]
    		c2 := s[2]
    		if c2 < 0x80 || 0xC0 <= c2 {
    			return 0, 2 // Illegal UTF-8: not a continuation byte.
    		}
    		o = uint32(i)<<6 + uint32(c2)
    		i = bidiIndex[o]
    		c3 := s[3]
    		if c3 < 0x80 || 0xC0 <= c3 {