Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for IndexBytePortable (0.25 sec)

  1. src/bytes/export_test.go

    // Copyright 2009 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package bytes
    
    // Export func for testing
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 24 00:56:36 UTC 2019
    - 244 bytes
    - Viewed (0)
  2. src/bytes/bytes_test.go

    			continue
    		}
    		a := []byte(tt.a)
    		b := tt.b[0]
    		pos := IndexByte(a, b)
    		if pos != tt.i {
    			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},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 56.5K bytes
    - Viewed (0)
Back to top