- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 29 for KindString (0.41 sec)
-
src/regexp/example_test.go
// Output: // true // false } func ExampleRegexp_FindString() { re := regexp.MustCompile(`foo.?`) fmt.Printf("%q\n", re.FindString("seafood fool")) fmt.Printf("%q\n", re.FindString("meat")) // Output: // "food" // "" } func ExampleRegexp_FindStringIndex() { re := regexp.MustCompile(`ab?`) fmt.Println(re.FindStringIndex("tablett"))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 07 00:22:53 UTC 2023 - 11.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/library/regex.go
if !ok { return types.MaybeNoSuchOverloadErr(regexVal) } re, err := regexp.Compile(regex) if err != nil { return types.NewErr("Illegal regex: %v", err.Error()) } result := re.FindString(str) return types.String(result) } func findAll(args ...ref.Val) ref.Val { argn := len(args) if argn < 2 || argn > 3 { return types.NoSuchOverloadErr() } str, ok := args[0].Value().(string)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Aug 23 21:31:27 UTC 2023 - 5.7K bytes - Viewed (0) -
src/cmd/go/internal/work/security.go
arg := list[i] if disallow != nil && disallow.FindString(arg) == arg { goto Bad } if allow != nil && allow.FindString(arg) == arg { continue Args } for _, re := range invalid { if re.FindString(arg) == arg { // must be complete match goto Bad } } for _, re := range valid { if re.FindString(arg) == arg { // must be complete match continue Args } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:47:34 UTC 2024 - 10K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/deprecation/deprecation.go
func MajorMinor(v version.Info) (int, int, error) { major, err := strconv.Atoi(v.Major) if err != nil { return 0, 0, err } minor, err := strconv.Atoi(leadingDigits.FindString(v.Minor)) if err != nil { return 0, 0, err } return major, minor, nil } // IsDeprecated returns true if obj implements APILifecycleDeprecated() and returns
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 26 17:14:05 UTC 2022 - 4.3K bytes - Viewed (0) -
src/runtime/testdata/testprog/numcpu_freebsd.go
} func checkNCPU(list []string) error { listString := strings.Join(list, ",") if len(listString) == 0 { return fmt.Errorf("could not check against an empty CPU list") } cListString := cpuSetRE.FindString(listString) if len(cListString) == 0 { return fmt.Errorf("invalid cpuset output '%s'", listString) } // Launch FreeBSDNumCPUHelper() with specified CPUs list.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 30 20:09:46 UTC 2022 - 3.4K bytes - Viewed (0) -
cmd/kube-controller-manager/app/controllermanager_test.go
for _, featureText := range utilfeature.DefaultFeatureGate.KnownFeatures() { // we have to parse this from KnownFeatures, because usage of mutable FeatureGate is not allowed in unit tests feature := featureGateRegex.FindString(featureText) if strings.Contains(featureText, string(featuregate.Alpha)) && feature != "AllAlpha" { alphaFeatures.Insert(feature) } } for name, controller := range NewControllerDescriptors() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 8.2K bytes - Viewed (0) -
src/cmd/vendor/github.com/google/pprof/internal/driver/interactive.go
cmd, args := input[:1], input[1:] name := cmd[0] c := pprofCommands[name] if c == nil { // Attempt splitting digits on abbreviated commands (eg top10) if d := tailDigitsRE.FindString(name); d != "" && d != name { name = name[:len(name)-len(d)] cmd[0], args = name, append([]string{d}, args...) c = pprofCommands[name] } } if c == nil { if _, ok := configHelp[name]; ok {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 22 18:58:12 UTC 2022 - 10.6K bytes - Viewed (0) -
src/regexp/exec_test.go
{"32M", 32 << 20}, } func TestLongest(t *testing.T) { re, err := Compile(`a(|b)`) if err != nil { t.Fatal(err) } if g, w := re.FindString("ab"), "a"; g != w { t.Errorf("first match was %q, want %q", g, w) } re.Longest() if g, w := re.FindString("ab"), "ab"; g != w { t.Errorf("longest match was %q, want %q", g, w) } } // TestProgramTooLongForBacktrack tests that a regex which is too long
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:36:03 UTC 2024 - 20.7K bytes - Viewed (0) -
operator/pkg/validate/common.go
) // validateWithRegex checks whether the given value matches the regexp r. func validateWithRegex(path util.Path, val any, r *regexp.Regexp) (errs util.Errors) { valStr := fmt.Sprint(val) if len(r.FindString(valStr)) != len(valStr) { errs = util.AppendErr(errs, fmt.Errorf("invalid value %s: %v", path, val)) printError(errs.ToError()) } return errs }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Aug 10 15:35:03 UTC 2023 - 11K bytes - Viewed (0) -
src/regexp/all_test.go
b.StopTimer() re := MustCompile("a+b+") wantSubs := "aaabb" s := "acbb" + wantSubs + "dd" b.StartTimer() b.ReportAllocs() for i := 0; i < b.N; i++ { subs := re.FindString(s) if subs != wantSubs { b.Fatalf("FindString(%q) = %q; want %q", s, subs, wantSubs) } } } func BenchmarkFindSubmatch(b *testing.B) { b.StopTimer() re := MustCompile("a(a+b+)b") wantSubs := "aaabb"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:36:03 UTC 2024 - 25.8K bytes - Viewed (0)