Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ExampleMatch (0.27 sec)

  1. src/path/example_test.go

    	fmt.Println(path.Join("", ""))
    	fmt.Println(path.Join("a", ""))
    	fmt.Println(path.Join("", "a"))
    
    	// Output:
    	// a/b/c
    	// a/b/c
    	// a/b/c
    	// ../xyz
    	//
    	// a
    	// a
    }
    
    func ExampleMatch() {
    	fmt.Println(path.Match("abc", "abc"))
    	fmt.Println(path.Match("a*", "abc"))
    	fmt.Println(path.Match("a*/b", "a/c/b"))
    	// Output:
    	// true <nil>
    	// true <nil>
    	// false <nil>
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 19 00:10:22 UTC 2020
    - 2.2K bytes
    - Viewed (0)
  2. src/path/filepath/example_unix_test.go

    	fmt.Println(filepath.Join("a/b", "/c"))
    
    	fmt.Println(filepath.Join("a/b", "../../../xyz"))
    
    	// Output:
    	// On Unix:
    	// a/b/c
    	// a/b/c
    	// a/b/c
    	// a/b/c
    	// ../xyz
    }
    
    func ExampleMatch() {
    	fmt.Println("On Unix:")
    	fmt.Println(filepath.Match("/home/catch/*", "/home/catch/foo"))
    	fmt.Println(filepath.Match("/home/catch/*", "/home/catch/foo/bar"))
    	fmt.Println(filepath.Match("/home/?opher", "/home/gopher"))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 3.4K bytes
    - Viewed (0)
  3. src/regexp/example_test.go

    	fmt.Println(validID.MatchString("eve[7]"))
    	fmt.Println(validID.MatchString("Job[48]"))
    	fmt.Println(validID.MatchString("snakey"))
    	// Output:
    	// true
    	// true
    	// false
    	// false
    }
    
    func ExampleMatch() {
    	matched, err := regexp.Match(`foo.*`, []byte(`seafood`))
    	fmt.Println(matched, err)
    	matched, err = regexp.Match(`bar.*`, []byte(`seafood`))
    	fmt.Println(matched, err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 00:22:53 UTC 2023
    - 11.1K bytes
    - Viewed (0)
Back to top