Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleBuffer_Next (0.4 sec)

  1. src/bytes/example_test.go

    	// Output: "64 bytes or fewer"
    }
    
    func ExampleBuffer_Len() {
    	var b bytes.Buffer
    	b.Grow(64)
    	b.Write([]byte("abcde"))
    	fmt.Printf("%d", b.Len())
    	// Output: 5
    }
    
    func ExampleBuffer_Next() {
    	var b bytes.Buffer
    	b.Grow(64)
    	b.Write([]byte("abcde"))
    	fmt.Printf("%s\n", b.Next(2))
    	fmt.Printf("%s\n", b.Next(2))
    	fmt.Printf("%s", b.Next(2))
    	// Output:
    	// ab
    	// cd
    	// e
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
Back to top