Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for toSymbolV2 (0.12 sec)

  1. src/cmd/internal/pkgpath/pkgpath.go

    		switch {
    		case 'A' <= r && r <= 'Z', 'a' <= r && r <= 'z',
    			'0' <= r && r <= '9':
    			return r
    		}
    		return '_'
    	}
    	return strings.Map(clean, ppath)
    }
    
    // toSymbolV2 converts a package path using the second mangling scheme.
    func toSymbolV2(ppath string) string {
    	var bsl strings.Builder
    	changed := false
    	for _, c := range ppath {
    		if ('A' <= c && c <= 'Z') || ('a' <= c && c <= 'z') || ('0' <= c && c <= '9') || c == '_' {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 4.2K bytes
    - Viewed (0)
  2. src/cmd/internal/pkgpath/pkgpath_test.go

    			t.Errorf("toSymbolV1(%q) = %q, want %q", test.input, got, want)
    		}
    	}
    }
    
    func TestV2(t *testing.T) {
    	for _, test := range symbolTests {
    		if got, want := toSymbolV2(test.input), test.v2; got != want {
    			t.Errorf("toSymbolV2(%q) = %q, want %q", test.input, got, want)
    		}
    	}
    }
    
    func TestV3(t *testing.T) {
    	for _, test := range symbolTests {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 18:26:59 UTC 2022
    - 2.9K bytes
    - Viewed (0)
Back to top