Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleHasPrefix (0.19 sec)

  1. src/bytes/example_test.go

    		return !unicode.IsLetter(c) && !unicode.IsNumber(c)
    	}
    	fmt.Printf("Fields are: %q", bytes.FieldsFunc([]byte("  foo1;bar2,baz3..."), f))
    	// Output: Fields are: ["foo1" "bar2" "baz3"]
    }
    
    func ExampleHasPrefix() {
    	fmt.Println(bytes.HasPrefix([]byte("Gopher"), []byte("Go")))
    	fmt.Println(bytes.HasPrefix([]byte("Gopher"), []byte("C")))
    	fmt.Println(bytes.HasPrefix([]byte("Gopher"), []byte("")))
    	// Output:
    	// true
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
Back to top