Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestLastIndexByte (0.13 sec)

  1. src/bytes/bytes_test.go

    			t.Errorf(`IndexByte(%q, '%c') = %v`, tt.a, b, pos)
    		}
    		posp := IndexBytePortable(a, b)
    		if posp != tt.i {
    			t.Errorf(`indexBytePortable(%q, '%c') = %v`, tt.a, b, posp)
    		}
    	}
    }
    
    func TestLastIndexByte(t *testing.T) {
    	testCases := []BinOpTest{
    		{"", "q", -1},
    		{"abcdef", "q", -1},
    		{"abcdefabcdef", "a", len("abcdef")},      // something in the middle
    		{"abcdefabcdef", "f", len("abcdefabcde")}, // last byte
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Aug 19 19:09:04 UTC 2024
    - 61.2K bytes
    - Viewed (0)
Back to top