Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 5,349 for fmtX (0.11 sec)

  1. src/regexp/example_test.go

    	fmt.Println(a.Split("banana", 1))
    	fmt.Println(a.Split("banana", 2))
    	zp := regexp.MustCompile(`z+`)
    	fmt.Println(zp.Split("pizza", -1))
    	fmt.Println(zp.Split("pizza", 0))
    	fmt.Println(zp.Split("pizza", 1))
    	fmt.Println(zp.Split("pizza", 2))
    	// Output:
    	// [b n n ]
    	// []
    	// [banana]
    	// [b nana]
    	// [pi a]
    	// []
    	// [pizza]
    	// [pi a]
    }
    
    func ExampleRegexp_Expand() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 00:22:53 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  2. src/cmd/gofmt/testdata/import.golden

    // package comment
    package main
    
    import (
    	"errors"
    	"fmt"
    	"io"
    	"log"
    	"math"
    )
    
    import (
    	"fmt"
    
    	"math"
    
    	"log"
    
    	"errors"
    
    	"io"
    )
    
    // We reset the line numbering to test that
    // the formatting works independent of line directives
    //line :19
    
    import (
    	"errors"
    	"fmt"
    	"io"
    	"log"
    	"math"
    
    	"fmt"
    
    	"math"
    
    	"log"
    
    	"errors"
    
    	"io"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 28 23:33:26 UTC 2019
    - 2.1K bytes
    - Viewed (0)
  3. src/cmd/vet/testdata/print/print.go

    	fmt.Printf("%s", &stringerv)
    	fmt.Printf("%v", &stringerv)
    	fmt.Printf("%T", &stringerv)
    	fmt.Printf("%s", &embeddedStringerv)
    	fmt.Printf("%v", &embeddedStringerv)
    	fmt.Printf("%T", &embeddedStringerv)
    	fmt.Printf("%v", notstringerv)
    	fmt.Printf("%T", notstringerv)
    	fmt.Printf("%q", stringerarrayv)
    	fmt.Printf("%v", stringerarrayv)
    	fmt.Printf("%s", stringerarrayv)
    	fmt.Printf("%v", notstringerarrayv)
    	fmt.Printf("%T", notstringerarrayv)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 27.5K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/helpers_test.go

    	assert.Equal(t, ua, fmt.Sprintf("%v", uaNotTruncated))
    
    	ua = ""
    	for i := 0; i < maxUserAgentLength*2; i++ {
    		ua = ua + "a"
    	}
    	req.Header.Set("User-Agent", ua)
    	uaTruncated := &lazyTruncatedUserAgent{req}
    	assert.NotEqual(t, ua, fmt.Sprintf("%v", uaTruncated))
    
    	usUnknown := &lazyTruncatedUserAgent{}
    	assert.Equal(t, "unknown", fmt.Sprintf("%v", usUnknown))
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Sep 03 15:25:35 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/test/testdata/gen/zeroGen.go

    		// type for test
    		fmt.Fprintf(w, "type Z%du1 struct {\n", s)
    		fmt.Fprintf(w, "  b   bool\n")
    		fmt.Fprintf(w, "  val [%d]byte\n", s)
    		fmt.Fprintf(w, "}\n")
    
    		fmt.Fprintf(w, "type Z%du2 struct {\n", s)
    		fmt.Fprintf(w, "  i   uint16\n")
    		fmt.Fprintf(w, "  val [%d]byte\n", s)
    		fmt.Fprintf(w, "}\n")
    
    		// function being tested
    		fmt.Fprintf(w, "//go:noinline\n")
    		fmt.Fprintf(w, "func zero%du1_ssa(t *Z%du1) {\n", s, s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  6. src/unicode/example_test.go

    			fmt.Println("\tis digit rune")
    		}
    		if unicode.IsGraphic(c) {
    			fmt.Println("\tis graphic rune")
    		}
    		if unicode.IsLetter(c) {
    			fmt.Println("\tis letter rune")
    		}
    		if unicode.IsLower(c) {
    			fmt.Println("\tis lower case rune")
    		}
    		if unicode.IsMark(c) {
    			fmt.Println("\tis mark rune")
    		}
    		if unicode.IsNumber(c) {
    			fmt.Println("\tis number rune")
    		}
    		if unicode.IsPrint(c) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 08 00:18:29 UTC 2021
    - 5.2K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/test/testdata/gen/cmpConstGen.go

    	for _, typ := range types {
    		fmt.Fprintf(w, "for i, test := range %v_tests {\n", typ)
    		fmt.Fprintf(w, "	for j, x := range %v_vals {\n", typ)
    		fmt.Fprintf(w, "		want := test.exp.l\n")
    		fmt.Fprintf(w, "		if j == test.idx {\nwant = test.exp.e\n}")
    		fmt.Fprintf(w, "		else if j > test.idx {\nwant = test.exp.r\n}\n")
    		fmt.Fprintf(w, "		if test.fn(x) != want {\n")
    		fmt.Fprintf(w, "			fn := runtime.FuncForPC(reflect.ValueOf(test.fn).Pointer()).Name()\n")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 6.4K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/_gen/main.go

    	}
    }
    
    func genOp() {
    	w := new(bytes.Buffer)
    	fmt.Fprintf(w, "// Code generated from _gen/*Ops.go using 'go generate'; DO NOT EDIT.\n")
    	fmt.Fprintln(w)
    	fmt.Fprintln(w, "package ssa")
    
    	fmt.Fprintln(w, "import (")
    	fmt.Fprintln(w, "\"cmd/internal/obj\"")
    	for _, a := range archs {
    		if a.pkg != "" {
    			fmt.Fprintf(w, "%q\n", a.pkg)
    		}
    	}
    	fmt.Fprintln(w, ")")
    
    	// generate Block* declarations
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 19 22:42:34 UTC 2023
    - 16.9K bytes
    - Viewed (0)
  9. src/runtime/mkduff.go

    		fmt.Fprintln(w, "\tMOVV\t(R20), R30")
    		fmt.Fprintln(w, "\tADDV\t$8, R20")
    		fmt.Fprintln(w, "\tMOVV\tR30, (R21)")
    		fmt.Fprintln(w, "\tADDV\t$8, R21")
    		fmt.Fprintln(w)
    	}
    	fmt.Fprintln(w, "\tRET")
    }
    
    func tagsPPC64x(w io.Writer) {
    	fmt.Fprintln(w)
    	fmt.Fprintln(w, "//go:build ppc64 || ppc64le")
    	fmt.Fprintln(w)
    }
    
    func zeroPPC64x(w io.Writer) {
    	// R0: always zero
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 19:04:21 UTC 2023
    - 8K bytes
    - Viewed (0)
  10. src/strings/example_test.go

    	fmt.Println(b.String())
    
    	// Output: 3...2...1...ignition
    }
    
    func ExampleCompare() {
    	fmt.Println(strings.Compare("a", "b"))
    	fmt.Println(strings.Compare("a", "a"))
    	fmt.Println(strings.Compare("b", "a"))
    	// Output:
    	// -1
    	// 0
    	// 1
    }
    
    func ExampleContains() {
    	fmt.Println(strings.Contains("seafood", "foo"))
    	fmt.Println(strings.Contains("seafood", "bar"))
    	fmt.Println(strings.Contains("seafood", ""))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 22:05:38 UTC 2023
    - 10.7K bytes
    - Viewed (0)
Back to top