Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TrimFunc (0.15 sec)

  1. src/bytes/bytes_test.go

    func TestTrimFunc(t *testing.T) {
    	for _, tc := range trimFuncTests {
    		trimmers := []struct {
    			name string
    			trim func(s []byte, f func(r rune) bool) []byte
    			out  []byte
    		}{
    			{"TrimFunc", TrimFunc, tc.trimOut},
    			{"TrimLeftFunc", TrimLeftFunc, tc.leftOut},
    			{"TrimRightFunc", TrimRightFunc, tc.rightOut},
    		}
    		for _, trimmer := range trimmers {
    			actual := trimmer.trim([]byte(tc.in), tc.f.f)
    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)
Back to top