Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 16 of 16 for encoderFunc (0.2 sec)

  1. 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)
  2. src/fmt/format.go

    	// For %#U we want to add a space and a quoted character at the end of the buffer.
    	if f.sharp && u <= utf8.MaxRune && strconv.IsPrint(rune(u)) {
    		i--
    		buf[i] = '\''
    		i -= utf8.RuneLen(rune(u))
    		utf8.EncodeRune(buf[i:], rune(u))
    		i--
    		buf[i] = '\''
    		i--
    		buf[i] = ' '
    	}
    	// Format the Unicode code point u as a hexadecimal number.
    	for u >= 16 {
    		i--
    		buf[i] = udigits[u&0xF]
    		prec--
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:31:55 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  3. src/bufio/bufio.go

    		if b.Flush(); b.err != nil {
    			return 0, b.err
    		}
    		n = b.Available()
    		if n < utf8.UTFMax {
    			// Can only happen if buffer is silly small.
    			return b.WriteString(string(r))
    		}
    	}
    	size = utf8.EncodeRune(b.buf[b.n:], r)
    	b.n += size
    	return size, nil
    }
    
    // WriteString writes a string.
    // It returns the number of bytes written.
    // If the count is less than len(s), it also returns an error explaining
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 14:39:08 UTC 2023
    - 21.8K bytes
    - Viewed (0)
  4. src/bytes/bytes_test.go

    			}
    		}
    		buf[n-1] = '\x00'
    	}
    }
    
    func bmIndexRune(index func([]byte, rune) int) func(b *testing.B, n int) {
    	return func(b *testing.B, n int) {
    		buf := bmbuf[0:n]
    		utf8.EncodeRune(buf[n-3:], '世')
    		for i := 0; i < b.N; i++ {
    			j := index(buf, '世')
    			if j != n-3 {
    				b.Fatal("bad index", j)
    			}
    		}
    		buf[n-3] = '\x00'
    		buf[n-2] = '\x00'
    		buf[n-1] = '\x00'
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  5. 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)
  6. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"DecodeRune", Func, 0},
    		{"Encode", Func, 0},
    		{"EncodeRune", Func, 0},
    		{"IsSurrogate", Func, 0},
    	},
    	"unicode/utf8": {
    		{"AppendRune", Func, 18},
    		{"DecodeLastRune", Func, 0},
    		{"DecodeLastRuneInString", Func, 0},
    		{"DecodeRune", Func, 0},
    		{"DecodeRuneInString", Func, 0},
    		{"EncodeRune", Func, 0},
    		{"FullRune", Func, 0},
    		{"FullRuneInString", Func, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top