Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 965 for runUse (0.14 sec)

  1. test/typeparam/issue23536.go

    // license that can be found in the LICENSE file.
    
    // Test case where a slice of a user-defined byte type (not uint8 or byte) is
    // converted to a string.  Same for slice of runes.
    
    package main
    
    type MyByte byte
    
    type MyRune rune
    
    func f[T []MyByte](x T) string {
    	return string(x)
    }
    
    func g[T []MyRune](x T) string {
    	return string(x)
    }
    
    func main() {
    	var y []MyByte
    	_ = f(y)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 556 bytes
    - Viewed (0)
  2. src/strconv/doc.go

    //
    //	q := strconv.Quote("Hello, 世界")
    //	q := strconv.QuoteToASCII("Hello, 世界")
    //
    // [QuoteRune] and [QuoteRuneToASCII] are similar but accept runes and
    // return quoted Go rune literals.
    //
    // [Unquote] and [UnquoteChar] unquote Go string and rune literals.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  3. test/fixedbugs/issue23536.go

    // license that can be found in the LICENSE file.
    
    // Test case where a slice of a user-defined byte type (not uint8 or byte) is
    // converted to a string.  Same for slice of runes.
    
    package main
    
    type MyByte byte
    
    type MyRune rune
    
    func main() {
    	var y []MyByte
    	_ = string(y)
    
    	var z []MyRune
    	_ = string(z)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 07 18:40:16 UTC 2022
    - 428 bytes
    - Viewed (0)
  4. test/string_lit.go

    	r = -1
    	s = string(r)
    	assert(s, "\xef\xbf\xbd", "negative rune")
    
    	// the large rune tests again, this time using constants instead of a variable.
    	// these conversions will be done at compile time.
    	s = string(0x10ffff) // largest rune value
    	assert(s, "\xf4\x8f\xbf\xbf", "largest rune constant")
    	s = string(0x10ffff + 1)
    	assert(s, "\xef\xbf\xbd", "too-large rune constant")
    	s = string(0xD800)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 13 01:17:02 UTC 2013
    - 3.6K bytes
    - Viewed (0)
  5. src/runtime/utf8.go

    	hicb = 0xBF // 1011 1111
    )
    
    // countrunes returns the number of runes in s.
    func countrunes(s string) int {
    	n := 0
    	for range s {
    		n++
    	}
    	return n
    }
    
    // decoderune returns the non-ASCII rune at the start of
    // s[k:] and the index after the rune in s.
    //
    // decoderune assumes that caller has checked that
    // the to be decoded rune is a non-ASCII rune.
    //
    // If the string appears to be incomplete or decoding problems
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 06 02:46:02 UTC 2020
    - 3.4K bytes
    - Viewed (0)
  6. pkg/kube/inject/testdata/inject/proxy-override-runas.yaml.tproxy.injected

    Jonh Wendell <******@****.***> 1715709579 -0400
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 17:59:39 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  7. pkg/kube/inject/testdata/inject/proxy-override-runas.yaml.cni.injected

    Jonh Wendell <******@****.***> 1715709579 -0400
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 17:59:39 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  8. src/unicode/utf16/utf16.go

    func Decode(s []uint16) []rune {
    	// Preallocate capacity to hold up to 64 runes.
    	// Decode inlines, so the allocation can live on the stack.
    	buf := make([]rune, 0, 64)
    	return decode(s, buf)
    }
    
    // decode appends to buf the Unicode code point sequence represented
    // by the UTF-16 encoding s and return the extended buffer.
    func decode(s []uint16, buf []rune) []rune {
    	for i := 0; i < len(s); i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 19:08:48 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  9. src/internal/types/testdata/spec/conversions.go

    }
    
    // "x is a string and T is a slice of bytes or runes"
    
    func _[T ~[]byte](x string) T { return T(x) }
    func _[T ~[]rune](x string) T { return T(x) }
    func _[T ~[]rune](x *string) T {
    	return T(x /* ERROR "cannot convert x (variable of type *string) to type T: cannot convert *string to type []rune (in T)" */)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  10. test/used.go

    package p
    
    import "unsafe"
    
    const C = 1
    
    var x, x1, x2 int
    var b bool
    var s string
    var c chan int
    var cp complex128
    var slice []int
    var array [2]int
    var bytes []byte
    var runes []rune
    var r rune
    
    func f0()            {}
    func f1() int        { return 1 }
    func f2() (int, int) { return 1, 1 }
    
    type T struct{ X int }
    
    func (T) M1() int { return 1 }
    func (T) M0()     {}
    func (T) M()      {}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 28 08:39:17 UTC 2020
    - 6K bytes
    - Viewed (0)
Back to top