Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for IsVowel (0.21 sec)

  1. staging/src/k8s.io/apiserver/pkg/endpoints/installer_test.go

    	}{
    		{
    			name: "yes",
    			arg:  'E',
    			want: true,
    		},
    		{
    			name: "no",
    			arg:  'n',
    			want: false,
    		},
    	}
    	for _, tt := range tests {
    		if got := isVowel(tt.arg); got != tt.want {
    			t.Errorf("%q. IsVowel() = %v, want %v", tt.name, got, tt.want)
    		}
    	}
    }
    
    func TestGetArticleForNoun(t *testing.T) {
    	tests := []struct {
    		noun    string
    		padding string
    		want    string
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 18:15:22 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/endpoints/installer.go

    		// Don't catch words like class
    		return fmt.Sprintf("%v", padding)
    	}
    
    	article := "a"
    	if isVowel(rune(noun[0])) {
    		article = "an"
    	}
    
    	return fmt.Sprintf("%s%s%s", padding, article, padding)
    }
    
    // isVowel returns true if the rune is a vowel (case insensitive).
    func isVowel(c rune) bool {
    	vowels := []rune{'a', 'e', 'i', 'o', 'u'}
    	for _, value := range vowels {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 18:15:22 UTC 2024
    - 51.5K bytes
    - Viewed (0)
  3. src/internal/trace/traceviewer/static/trace_viewer_full.html

    showEl.addEventListener('click',onClick.bind(this));this.updateMetadataButton...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 20:45:06 UTC 2023
    - 2.5M bytes
    - Viewed (1)
Back to top