Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleBuffer_ReadByte (0.26 sec)

  1. src/bytes/example_test.go

    	n, err := b.Read(rdbuf)
    	if err != nil {
    		panic(err)
    	}
    	fmt.Println(n)
    	fmt.Println(b.String())
    	fmt.Println(string(rdbuf))
    	// Output:
    	// 1
    	// bcde
    	// a
    }
    
    func ExampleBuffer_ReadByte() {
    	var b bytes.Buffer
    	b.Grow(64)
    	b.Write([]byte("abcde"))
    	c, err := b.ReadByte()
    	if err != nil {
    		panic(err)
    	}
    	fmt.Println(c)
    	fmt.Println(b.String())
    	// Output:
    	// 97
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
Back to top