Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for encoderFunc (0.12 sec)

  1. src/encoding/json/encode.go

    	escapeHTML bool
    }
    
    type encoderFunc func(e *encodeState, v reflect.Value, opts encOpts)
    
    var encoderCache sync.Map // map[reflect.Type]encoderFunc
    
    func valueEncoder(v reflect.Value) encoderFunc {
    	if !v.IsValid() {
    		return invalidValueEncoder
    	}
    	return typeEncoder(v.Type())
    }
    
    func typeEncoder(t reflect.Type) encoderFunc {
    	if fi, ok := encoderCache.Load(t); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  2. src/runtime/string.go

    	}
    	var dum [4]byte
    	size1 := 0
    	for _, r := range a {
    		size1 += encoderune(dum[:], r)
    	}
    	s, b := rawstringtmp(buf, size1+3)
    	size2 := 0
    	for _, r := range a {
    		// check for race
    		if size2 >= size1 {
    			break
    		}
    		size2 += encoderune(b[size2:], r)
    	}
    	return s[:size2]
    }
    
    type stringStruct struct {
    	str unsafe.Pointer
    	len int
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  3. src/encoding/json/decode.go

    						// A valid pair; consume.
    						r += 6
    						w += utf8.EncodeRune(b[w:], dec)
    						break
    					}
    					// Invalid surrogate; fall back to replacement rune.
    					rr = unicode.ReplacementChar
    				}
    				w += utf8.EncodeRune(b[w:], rr)
    			}
    
    		// Quote, control characters are invalid.
    		case c == '"', c < ' ':
    			return
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/typestring.go

    func subscript(x uint64) string {
    	const w = len("₀") // all digits 0...9 have the same utf8 width
    	var buf [32 * w]byte
    	i := len(buf)
    	for {
    		i -= w
    		utf8.EncodeRune(buf[i:], '₀'+rune(x%10)) // '₀' == U+2080
    		x /= 10
    		if x == 0 {
    			break
    		}
    	}
    	return string(buf[i:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  5. src/go/types/typestring.go

    func subscript(x uint64) string {
    	const w = len("₀") // all digits 0...9 have the same utf8 width
    	var buf [32 * w]byte
    	i := len(buf)
    	for {
    		i -= w
    		utf8.EncodeRune(buf[i:], '₀'+rune(x%10)) // '₀' == U+2080
    		x /= 10
    		if x == 0 {
    			break
    		}
    	}
    	return string(buf[i:])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  6. doc/go_spec.html

    integer-to-string conversions as potential errors.
    Library functions such as
    <a href="/pkg/unicode/utf8#AppendRune"><code>utf8.AppendRune</code></a> or
    <a href="/pkg/unicode/utf8#EncodeRune"><code>utf8.EncodeRune</code></a>
    should be used instead.
    </li>
    </ol>
    
    <h4 id="Conversions_from_slice_to_array_or_array_pointer">Conversions from slice to array or array pointer</h4>
    
    <p>
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 21:07:21 UTC 2024
    - 281.5K bytes
    - Viewed (1)
Back to top