Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 618 for Trune (0.05 sec)

  1. test/alias.go

    // (uint8 vs byte, int32 vs. rune).
    // Does not compile.
    
    package main
    
    import (
    	"fmt"
    	"unicode/utf8"
    )
    
    func f(byte)  {}
    func g(uint8) {}
    
    func main() {
    	var x float64
    	f(x) // ERROR "byte"
    	g(x) // ERROR "uint8"
    
    	// Test across imports.
    
    	var ff fmt.Formatter
    	var fs fmt.State
    	ff.Format(fs, x) // ERROR "rune"
    
    	utf8.RuneStart(x) // ERROR "byte"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 588 bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/stringintconv/string.go

    				switch u.Kind() {
    				case types.Byte, types.Rune, types.UntypedRune:
    					continue
    				}
    				V0 = vt
    				break
    			}
    		}
    
    		if V0 == nil {
    			// No source types are non-byte or rune integer types.
    			return
    		}
    
    		convertibleToRune := true // if true, we can suggest a fix
    		for _, t := range vtypes {
    			if !types.ConvertibleTo(t, types.Typ[types.Rune]) {
    				convertibleToRune = false
    				break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  3. src/strconv/makeisprint.go

    	if i >= len(rang) || rr < rang[i&^1] || rang[i|1] < rr {
    		return false
    	}
    	_, found := slices.BinarySearch(except, rr)
    	return !found
    }
    
    func scan(min, max rune) (rang, except []uint32) {
    	lo := rune(-1)
    	for i := min; ; i++ {
    		if (i > max || !unicode.IsPrint(i)) && lo >= 0 {
    			// End range, but avoid flip flop.
    			if i+1 <= max && unicode.IsPrint(i+1) {
    				except = append(except, uint32(i))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 18:56:17 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  4. src/internal/types/testdata/fixedbugs/issue58671.go

    package p
    
    func g[P any](...P) P { var x P; return x }
    
    func _() {
    	var (
    		_ int        = g(1, 2)
    		_ rune       = g(1, 'a')
    		_ float64    = g(1, 'a', 2.3)
    		_ float64    = g('a', 2.3)
    		_ complex128 = g(2.3, 'a', 1i)
    	)
    	g(true, 'a' /* ERROR "mismatched types untyped bool and untyped rune (cannot infer P)" */)
    	g(1, "foo" /* ERROR "mismatched types untyped int and untyped string (cannot infer P)" */)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 19 01:56:58 UTC 2023
    - 668 bytes
    - Viewed (0)
  5. tools/bug-report/pkg/util/path/path.go

    func (p Path) String() string {
    	return strings.Join(p, pathSeparator)
    }
    
    // splitEscaped splits a string using the rune r as a separator. It does not split on r if it's prefixed by \.
    func splitEscaped(s string, r rune) []string {
    	var prev rune
    	if len(s) == 0 {
    		return []string{}
    	}
    	prevIdx := 0
    	var out []string
    	for i, c := range s {
    		if c == r && (i == 0 || (i > 0 && prev != '\\')) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Sep 01 20:55:53 UTC 2020
    - 2.2K bytes
    - Viewed (0)
  6. src/strings/strings.go

    	// the closure once per rune.
    	prev := ' '
    	return Map(
    		func(r rune) rune {
    			if isSeparator(prev) {
    				prev = r
    				return unicode.ToTitle(r)
    			}
    			prev = r
    			return r
    		},
    		s)
    }
    
    // TrimLeftFunc returns a slice of the string s with all leading
    // Unicode code points c satisfying f(c) removed.
    func TrimLeftFunc(s string, f func(rune) bool) string {
    	i := indexFunc(s, f, false)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:48:16 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/text/cases/map.go

    // A mapFunc takes a context set to the current rune and writes the mapped
    // version to the same context. It may advance the context to the next rune. It
    // returns whether a checkpoint is possible: whether the pDst bytes written to
    // dst so far won't need changing as we see more source bytes.
    type mapFunc func(*context) bool
    
    // A spanFunc takes a context set to the current rune and returns whether this
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 22.7K bytes
    - Viewed (0)
  8. src/html/escape.go

    			c = s[i]
    			i++
    			if hex {
    				if '0' <= c && c <= '9' {
    					x = 16*x + rune(c) - '0'
    					continue
    				} else if 'a' <= c && c <= 'f' {
    					x = 16*x + rune(c) - 'a' + 10
    					continue
    				} else if 'A' <= c && c <= 'F' {
    					x = 16*x + rune(c) - 'A' + 10
    					continue
    				}
    			} else if '0' <= c && c <= '9' {
    				x = 10*x + rune(c) - '0'
    				continue
    			}
    			if c != ';' {
    				i--
    			}
    			break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 13 07:00:18 UTC 2020
    - 5K bytes
    - Viewed (0)
  9. src/unicode/digit.go

    // Copyright 2009 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package unicode
    
    // IsDigit reports whether the rune is a decimal digit.
    func IsDigit(r rune) bool {
    	if r <= MaxLatin1 {
    		return '0' <= r && r <= '9'
    	}
    	return isExcludingLatin(Digit, r)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 352 bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/request/object_count_tracker_test.go

    			lastUpdatedAt: mostRecent,
    		},
    	}
    
    	fakeClock.SetTime(now)
    	if err := tracker.prune(time.Hour); err != nil {
    		t.Fatalf("Expected no error, but got: %v", err)
    	}
    
    	// we expect only one entry in the map, so DeepEqual should work.
    	if !reflect.DeepEqual(expected, tracker.counts) {
    		t.Errorf("Expected prune to remove stale entries - diff: %s", cmp.Diff(expected, tracker.counts))
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 17 19:36:14 UTC 2021
    - 3.4K bytes
    - Viewed (0)
Back to top