Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for TrimPrefix (2.24 sec)

  1. src/bytes/bytes_test.go

    	{"TrimRight", []byte{'a'}, "ab", []byte{}},
    	{"TrimRight", []byte{'a', 'b'}, "ab", []byte{}},
    	{"TrimRight", []byte("☺"), "☺", []byte{}},
    	{"TrimPrefix", nil, "", nil},
    	{"TrimPrefix", []byte{}, "", []byte{}},
    	{"TrimPrefix", []byte{'a'}, "a", []byte{}},
    	{"TrimPrefix", []byte("☺"), "☺", []byte{}},
    	{"TrimSuffix", nil, "", nil},
    	{"TrimSuffix", []byte{}, "", []byte{}},
    	{"TrimSuffix", []byte{'a'}, "a", []byte{}},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  2. src/cmd/cgo/gcc.go

    	var goname string
    	switch fun := call.Call.Fun.(type) {
    	case *ast.SelectorExpr:
    		goname = fun.Sel.Name
    	case *ast.Ident:
    		goname = strings.TrimPrefix(fun.Name, "_C2func_")
    		goname = strings.TrimPrefix(goname, "_Cfunc_")
    	}
    	if goname == "" || goname == "malloc" {
    		return "", false
    	}
    	name := f.Name[goname]
    	if name == nil || name.Kind != "func" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 97K bytes
    - Viewed (0)
  3. src/cmd/go/internal/test/test.go

    	for _, p := range pkgs {
    		buildTest, runTest, printTest, err := builderTest(b, ctx, pkgOpts, p, allImports[p], writeCoverMetaAct)
    		if err != nil {
    			str := err.Error()
    			str = strings.TrimPrefix(str, "\n")
    			if p.ImportPath != "" {
    				base.Errorf("# %s\n%s", p.ImportPath, str)
    			} else {
    				base.Errorf("%s", str)
    			}
    			fmt.Printf("FAIL\t%s [setup failed]\n", p.ImportPath)
    			continue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 71.9K bytes
    - Viewed (0)
  4. src/cmd/dist/build.go

    		fatalf("current directory %s is not under %s", pwd, real_src)
    	}
    	pwd = pwd[len(real_src):]
    	// guard against xrealwd returning the directory without the trailing /
    	pwd = strings.TrimPrefix(pwd, "/")
    
    	return pwd
    }
    
    // Install installs the list of packages named on the command line.
    func cmdinstall() {
    	xflagparse(-1)
    
    	if flag.NArg() == 0 {
    		install(defaulttarg())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:40 UTC 2024
    - 54K bytes
    - Viewed (0)
  5. 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)
  6. src/cmd/dist/test.go

    	undo = func() {
    		for i := range dirs {
    			os.Chmod(dirs[i].path, dirs[i].mode) // best effort
    		}
    	}
    
    	filepath.WalkDir(dir, func(path string, d fs.DirEntry, err error) error {
    		if suffix := strings.TrimPrefix(path, dir+string(filepath.Separator)); suffix != "" {
    			if suffix == ".git" {
    				// Leave Git metadata in whatever state it was in. It may contain a lot
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 16:01:35 UTC 2024
    - 50K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types/type.go

    // values of type Object to ir.Node or a more specific type.
    type Object interface {
    	Pos() src.XPos
    	Sym() *Sym
    	Type() *Type
    }
    
    //go:generate stringer -type Kind -trimprefix T type.go
    
    // Kind describes a kind of type.
    type Kind uint8
    
    const (
    	Txxx Kind = iota
    
    	TINT8
    	TUINT8
    	TINT16
    	TUINT16
    	TINT32
    	TUINT32
    	TINT64
    	TUINT64
    	TINT
    	TUINT
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
Back to top