Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 530 for rune1 (0.18 sec)

  1. src/fmt/scan_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	if n != 3 {
    		t.Fatalf("expected 3 items consumed, got %d", n)
    	}
    	if a.rune != '1' || b.rune != '2' || c.rune != '➂' {
    		t.Errorf("bad scan rune: %q %q %q should be '1' '2' '➂'", a.rune, b.rune, c.rune)
    	}
    	if a.size != 1 || b.size != 1 || c.size != 3 {
    		t.Errorf("bad scan size: %q %q %q should be 1 1 3", a.size, b.size, c.size)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 20:25:13 UTC 2023
    - 39.3K bytes
    - Viewed (0)
  2. src/unicode/digit_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package unicode_test
    
    import (
    	"testing"
    	. "unicode"
    )
    
    var testDigit = []rune{
    	0x0030,
    	0x0039,
    	0x0661,
    	0x06F1,
    	0x07C9,
    	0x0966,
    	0x09EF,
    	0x0A66,
    	0x0AEF,
    	0x0B66,
    	0x0B6F,
    	0x0BE6,
    	0x0BEF,
    	0x0C66,
    	0x0CEF,
    	0x0D66,
    	0x0D6F,
    	0x0E50,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 08 04:08:51 UTC 2014
    - 1.5K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/syntax/scanner.go

    			panic("imperfect hash")
    		}
    		keywordMap[h] = tok
    	}
    }
    
    func lower(ch rune) rune     { return ('a' - 'A') | ch } // returns lower-case ch iff ch is ASCII letter
    func isLetter(ch rune) bool  { return 'a' <= lower(ch) && lower(ch) <= 'z' || ch == '_' }
    func isDecimal(ch rune) bool { return '0' <= ch && ch <= '9' }
    func isHex(ch rune) bool     { return '0' <= ch && ch <= '9' || 'a' <= lower(ch) && lower(ch) <= 'f' }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 28 18:17:41 UTC 2022
    - 17.1K bytes
    - Viewed (0)
  4. test/initialize.go

    func f12(b []byte) [2][]byte { return [2][]byte{b, b} }
    
    var a12 = f12([]byte("hello"))
    var a13 = f12([]byte{1, 2, 3})
    var a14 = f12(make([]byte, 1))
    
    func f15(b []rune) [2][]rune { return [2][]rune{b, b} }
    
    var a15 = f15([]rune("hello"))
    var a16 = f15([]rune{1, 2, 3})
    
    type Same struct {
    	a, b interface{}
    }
    
    var same = []Same{
    	{a1, b1},
    	{a2, b2},
    	{a3, b3},
    	{a4, b4},
    	{a5, b5},
    	{a6, b6},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 16 04:04:52 UTC 2022
    - 2.2K bytes
    - Viewed (0)
  5. test/utf.go

    package main
    
    import "unicode/utf8"
    
    func main() {
    	var chars [6]rune
    	chars[0] = 'a'
    	chars[1] = 'b'
    	chars[2] = 'c'
    	chars[3] = '\u65e5'
    	chars[4] = '\u672c'
    	chars[5] = '\u8a9e'
    	s := ""
    	for i := 0; i < 6; i++ {
    		s += string(chars[i])
    	}
    	var l = len(s)
    	for w, i, j := 0, 0, 0; i < l; i += w {
    		var r rune
    		r, w = utf8.DecodeRuneInString(s[i:len(s)])
    		if w == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 00:48:19 UTC 2012
    - 1.2K bytes
    - Viewed (0)
  6. test/alias3.dir/a.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package a
    
    import "go/build"
    
    type (
    	Float64 = float64
    	Rune    = rune
    )
    
    type (
    	Int       int
    	IntAlias  = Int
    	IntAlias2 = IntAlias
    	S         struct {
    		Int
    		IntAlias
    		IntAlias2
    	}
    )
    
    type (
    	Context = build.Context
    )
    
    type (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 20 05:55:53 UTC 2017
    - 540 bytes
    - Viewed (0)
  7. src/internal/fuzz/encoding.go

    			} else {
    				fmt.Fprintf(b, "%T(%v)\n", t, t)
    			}
    		case string:
    			fmt.Fprintf(b, "string(%q)\n", t)
    		case rune: // int32
    			// Although rune and int32 are represented by the same type, only a subset
    			// of valid int32 values can be expressed as rune literals. Notably,
    			// negative numbers, surrogate halves, and values above unicode.MaxRune
    			// have no quoted representation.
    			//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 30 16:39:12 UTC 2022
    - 11K bytes
    - Viewed (0)
  8. src/vendor/golang.org/x/text/transform/transform.go

    	return dstL.n, srcL.p, err
    }
    
    // Deprecated: Use runes.Remove instead.
    func RemoveFunc(f func(r rune) bool) Transformer {
    	return removeF(f)
    }
    
    type removeF func(r rune) bool
    
    func (removeF) Reset() {}
    
    // Transform implements the Transformer interface.
    func (t removeF) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
    	for r, sz := rune(0), 0; len(src) > 0; src = src[sz:] {
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 21 22:10:00 UTC 2020
    - 21.7K bytes
    - Viewed (0)
  9. src/cmd/internal/archive/archive_test.go

    		got := exactly16Bytes(str)
    		if len(got) != 16 {
    			t.Errorf("exactly16Bytes(%q) is %q, length %d", str, got, len(got))
    		}
    		// Make sure it is full runes.
    		for _, c := range got {
    			if c == utf8.RuneError {
    				t.Errorf("exactly16Bytes(%q) is %q, has partial rune", str, got)
    			}
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 02 19:27:33 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  10. src/strings/example_test.go

    func ExampleContainsFunc() {
    	f := func(r rune) bool {
    		return r == 'a' || r == 'e' || r == 'i' || r == 'o' || r == 'u'
    	}
    	fmt.Println(strings.ContainsFunc("hello", f))
    	fmt.Println(strings.ContainsFunc("rhythms", f))
    	// Output:
    	// true
    	// false
    }
    
    func ExampleCount() {
    	fmt.Println(strings.Count("cheese", "e"))
    	fmt.Println(strings.Count("five", "")) // before & after each rune
    	// Output:
    	// 3
    	// 5
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 22:05:38 UTC 2023
    - 10.7K bytes
    - Viewed (0)
Back to top