Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for ToLower (0.28 sec)

  1. src/cmd/go/internal/toolchain/path_windows.go

    var pathExts struct {
    	once sync.Once
    	list []string
    }
    
    func initPathExts() {
    	var exts []string
    	x := os.Getenv(`PATHEXT`)
    	if x != "" {
    		for _, e := range strings.Split(strings.ToLower(x), `;`) {
    			if e == "" {
    				continue
    			}
    			if e[0] != '.' {
    				e = "." + e
    			}
    			exts = append(exts, e)
    		}
    	} else {
    		exts = []string{".com", ".exe", ".bat", ".cmd"}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 31 15:15:19 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  2. src/cmd/go/testdata/script/build_cd_gopath_different.txt

    	gopath := os.Args[2]
    	switch os.Args[3] {
    		case "IDENTITY":
    		case "REPLACE_SLASH": gopath = strings.ReplaceAll(gopath, `\`, `/`)
    		case "UPPER": gopath = strings.ToUpper(gopath)
    		case "LOWER": gopath = strings.ToLower(gopath)
    		default: fmt.Fprintln(os.Stderr, "bad op"); os.Exit(1)
    	}
    	cmd := exec.Command("go", os.Args[4:]...)
    	cmd.Dir = dir
    	cmd.Env = append(os.Environ(), "GOPATH="+gopath)
    	cmd.Stdout = os.Stdout
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 21:26:10 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  3. src/cmd/go/internal/str/str.go

    //
    // This lets us test a large set of strings for fold-equivalent
    // duplicates without making a quadratic number of calls
    // to EqualFold. Note that strings.ToUpper and strings.ToLower
    // do not have the desired property in some corner cases.
    func ToFold(s string) string {
    	// Fast path: all ASCII, no upper case.
    	// Most paths look like this already.
    	for i := 0; i < len(s); i++ {
    		c := s[i]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 23 20:08:07 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  4. src/cmd/go/internal/version/version.go

    func isGoBinaryCandidate(file string, info fs.FileInfo) bool {
    	if info.Mode().IsRegular() && info.Mode()&0111 != 0 {
    		return true
    	}
    	name := strings.ToLower(file)
    	switch filepath.Ext(name) {
    	case ".so", ".exe", ".dll":
    		return true
    	default:
    		return strings.Contains(name, ".so.")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 19:27:00 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  5. src/cmd/go/internal/tool/tool.go

    		return
    	}
    
    	sort.Strings(names)
    	for _, name := range names {
    		// Unify presentation by going to lower case.
    		// If it's windows, don't show the .exe suffix.
    		name = strings.TrimSuffix(strings.ToLower(name), cfg.ToolExeSuffix())
    
    		// The tool directory used by gccgo will have other binaries
    		// in addition to go tools. Only display go tools here.
    		if cfg.BuildToolchainName == "gccgo" && !isGccgoTool(name) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 18:02:11 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  6. src/cmd/go/internal/web/http.go

    	}
    
    	if res.StatusCode != http.StatusOK {
    		contentType := res.Header.Get("Content-Type")
    		if mediaType, params, _ := mime.ParseMediaType(contentType); mediaType == "text/plain" {
    			switch charset := strings.ToLower(params["charset"]); charset {
    			case "us-ascii", "utf-8", "":
    				// Body claims to be plain text in UTF-8 or a subset thereof.
    				// Try to extract a useful error message from it.
    				r.errorDetail.r = res.Body
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 10 17:34:27 UTC 2023
    - 9.7K bytes
    - Viewed (0)
  7. src/bytes/bytes_test.go

    		t.Errorf("invalidRune: expected %q got %q", expect, m)
    	}
    }
    
    func TestToUpper(t *testing.T) { runStringTests(t, ToUpper, "ToUpper", upperTests) }
    
    func TestToLower(t *testing.T) { runStringTests(t, ToLower, "ToLower", lowerTests) }
    
    func BenchmarkToUpper(b *testing.B) {
    	for _, tc := range upperTests {
    		tin := []byte(tc.in)
    		b.Run(tc.in, func(b *testing.B) {
    			for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/api_test.go

    		if inner == nil {
    			t.Errorf("%s: at %s: can't find innermost scope", pos, text)
    			return
    		}
    		got := "undef"
    		if _, obj := inner.LookupParent(name, pos); obj != nil {
    			kind := strings.ToLower(strings.TrimPrefix(reflect.TypeOf(obj).String(), "*types2."))
    			got = fmt.Sprintf("%s:%d", kind, obj.Pos().Line())
    		}
    		if got != want {
    			t.Errorf("%s: at %s: %s resolved to %s, want %s", pos, text, name, got, want)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 93.3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/amd64/versions_test.go

    		parts := re.FindStringSubmatch(line)
    		if len(parts) == 0 {
    			continue
    		}
    		addr, err := strconv.ParseUint(parts[1], 16, 64)
    		if err != nil {
    			continue // not a hex address
    		}
    		opcode := strings.ToLower(parts[3])
    		if !opcodes[opcode] {
    			continue
    		}
    		t.Logf("clobbering instruction %s", line)
    		n := (len(parts[2]) - strings.Count(parts[2], " ")) / 2 // number of bytes in instruction encoding
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:19:15 UTC 2022
    - 10.9K bytes
    - Viewed (0)
  10. src/cmd/dist/buildtool.go

    	if fileArch == "" {
    		return "", false
    	}
    	b := fileArch[0]
    	if b == '_' || ('a' <= b && b <= 'z') {
    		return "", false
    	}
    	archCaps = fileArch
    	fileArch = strings.ToLower(fileArch)
    	fileArch = strings.TrimSuffix(fileArch, "splitload")
    	fileArch = strings.TrimSuffix(fileArch, "latelower")
    	if fileArch == goArch {
    		return "", false
    	}
    	if fileArch == strings.TrimSuffix(goArch, "le") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 23:29:41 UTC 2024
    - 11.5K bytes
    - Viewed (0)
Back to top