Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for Iune (0.18 sec)

  1. src/bytes/bytes_test.go

    	}
    
    	// 5. Drop
    	dropNotLatin := func(r rune) rune {
    		if unicode.Is(unicode.Latin, r) {
    			return r
    		}
    		return -1
    	}
    	m = Map(dropNotLatin, []byte("Hello, 세계"))
    	expect = "Hello"
    	if string(m) != expect {
    		t.Errorf("drop: expected %q got %q", expect, m)
    	}
    
    	// 6. Invalid rune
    	invalidRune := func(r rune) rune {
    		return utf8.MaxRune + 1
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  2. src/bufio/scan.go

    	if width > 1 {
    		// It's a valid encoding. Width cannot be one for a correctly encoded
    		// non-ASCII rune.
    		return width, data[0:width], nil
    	}
    
    	// We know it's an error: we have width==1 and implicitly r==utf8.RuneError.
    	// Is the error because there wasn't a full rune to be decoded?
    	// FullRune distinguishes correctly between erroneous and incomplete encodings.
    	if !atEOF && !utf8.FullRune(data) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  3. src/bytes/example_test.go

    	fmt.Println(bytes.LastIndexFunc([]byte("go gopher!"), unicode.IsNumber))
    	// Output:
    	// 8
    	// 9
    	// -1
    }
    
    func ExampleMap() {
    	rot13 := func(r rune) rune {
    		switch {
    		case r >= 'A' && r <= 'Z':
    			return 'A' + (r-'A'+13)%26
    		case r >= 'a' && r <= 'z':
    			return 'a' + (r-'a'+13)%26
    		}
    		return r
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  4. src/cmd/api/testdata/src/pkg/p1/p1.go

    var m map[string]int
    
    var chanVar chan int
    
    var ifaceVar any = 5
    
    var assertVar = ifaceVar.(int)
    
    var indexVar = m["foo"]
    
    var Byte byte
    var ByteFunc func(byte) rune
    
    type ByteStruct struct {
    	B byte
    	R rune
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Dec 02 16:29:41 GMT 2022
    - 3.3K bytes
    - Viewed (0)
  5. src/bytes/buffer_test.go

    	}
    }
    
    func TestRuneIO(t *testing.T) {
    	const NRune = 1000
    	// Built a test slice while we write the data
    	b := make([]byte, utf8.UTFMax*NRune)
    	var buf Buffer
    	n := 0
    	for r := rune(0); r < NRune; r++ {
    		size := utf8.EncodeRune(b[n:], r)
    		nbytes, err := buf.WriteRune(r)
    		if err != nil {
    			t.Fatalf("WriteRune(%U) error: %s", r, err)
    		}
    		if nbytes != size {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  6. doc/go1.17_spec.html

    2.71828i
    1.e+0i
    6.67428e-11i
    1E6i
    .25i
    .12345E+5i
    0x1p-2i       // == 0x1p-2 * 1i == 0.25i
    </pre>
    
    
    <h3 id="Rune_literals">Rune literals</h3>
    
    <p>
    A rune literal represents a <a href="#Constants">rune constant</a>,
    an integer value identifying a Unicode code point.
    A rune literal is expressed as one or more characters enclosed in single quotes,
    as in <code>'x'</code> or <code>'\n'</code>.
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  7. src/bufio/bufio_test.go

    }
    
    func TestReader(t *testing.T) {
    	var texts [31]string
    	str := ""
    	all := ""
    	for i := 0; i < len(texts)-1; i++ {
    		texts[i] = str + "\n"
    		all += texts[i]
    		str += string(rune(i%26 + 'a'))
    	}
    	texts[len(texts)-1] = all
    
    	for h := 0; h < len(texts); h++ {
    		text := texts[h]
    		for i := 0; i < len(readMakers); i++ {
    			for j := 0; j < len(bufreaders); j++ {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  8. api/go1.5.txt

    pkg go/types, const MethodVal = 1
    pkg go/types, const MethodVal SelectionKind
    pkg go/types, const RecvOnly = 2
    pkg go/types, const RecvOnly ChanDir
    pkg go/types, const Rune = 5
    pkg go/types, const Rune BasicKind
    pkg go/types, const SendOnly = 1
    pkg go/types, const SendOnly ChanDir
    pkg go/types, const SendRecv = 0
    pkg go/types, const SendRecv ChanDir
    pkg go/types, const String = 17
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jul 30 21:14:09 GMT 2015
    - 46.6K bytes
    - Viewed (0)
  9. src/bytes/buffer.go

    // converted to int they correspond to the rune size that was read.
    type readOp int8
    
    // Don't use iota for these, as the values need to correspond with the
    // names and comments, which is easier to see when being explicit.
    const (
    	opRead      readOp = -1 // Any other read operation.
    	opInvalid   readOp = 0  // Non-read operation.
    	opReadRune1 readOp = 1  // Read rune of size 1.
    	opReadRune2 readOp = 2  // Read rune of size 2.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  10. src/cmd/asm/internal/lex/tokenizer.go

    		line: 1,
    		file: file,
    	}
    }
    
    // We want center dot (·) and division slash (∕) to work as identifier characters.
    func isIdentRune(ch rune, i int) bool {
    	if unicode.IsLetter(ch) {
    		return true
    	}
    	switch ch {
    	case '_': // Underscore; traditional.
    		return true
    	case '\u00B7': // Represents the period in runtime.exit. U+00B7 '·' middle dot
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Aug 04 20:35:21 GMT 2022
    - 3K bytes
    - Viewed (0)
Back to top