// AddStrings adds a string flag to BFlags that can match multiple values
493327
func (bf *BFlags) AddStrings(name string) *Flag {
	flag := bf.addFlag(name, stringsType)
	if flag == nil {
		return nil
	}
	return flag
}
1169547
func (c *Menu) SetOptionsFromStrings(opts []string) {
	var newOpts []MenuOption
	for _, v := range opts {
		newOpts = append(newOpts, *CreateOptionFromText(v))
	}
	c.SetOptions(newOpts)
	c.SetSelectedOption(c.GetOptionFromIndex(0))
}
1106664
func (r Render) AddFromString(name, templateString string) *template.Template {
	tmpl := template.Must(template.New(name).Parse(templateString))
	r.Add(name, tmpl)
	return tmpl
}
186583
func (ss stringSet) add(keys ...string) {
	for _, key := range keys {
		ss[key] = struct{}{}
	}
}
977316
func (ca *CustomArgs) AddFlags(fs *pflag.FlagSet) {
	fs.StringVar(&ca.InternalClientSetPackage, "internal-clientset-package", ca.InternalClientSetPackage, "the full package name for the internal clientset to use")
	fs.StringVar(&ca.VersionedClientSetPackage, "versioned-clientset-package", ca.VersionedClientSetPackage, "the full package name for the versioned clientset to use")
	fs.StringVar(&ca.ListersPackage, "listers-package", ca.ListersPackage, "the full package name for the listers to use")
	fs.BoolVar(&ca.SingleDirectory, "single-directory", ca.SingleDirectory, "if true, omit the intermediate \"internalversion\" and \"externalversions\" subdirectories")
}
379926
func BytesToStrings(a [][]byte) []string {
	s := make([]string, 0, len(a))
	for _, v := range a {
		s = append(s, string(v))
	}
	return s
}
1017091
func (k Key) AppendStrings(others ...string) Key {
	return k.Append(NewKey(others...))
}
570526
func (e Encoder) AppendStrings(dst []byte, vals []string) []byte {
	major := majorTypeArray
	l := len(vals)
	if l <= additionalMax {
		lb := byte(l)
		dst = append(dst, byte(major|lb))
	} else {
		dst = appendCborTypePrefix(dst, major, uint64(l))
	}
	for _, v := range vals {
		dst = e.AppendString(dst, v)
	}
	return dst
}
984122
func (g *Globber) globStrings(list []string, dir, pattern string, matches []string) ([]string, error) {
	m := matches
	matchtree := g.config.GlobStar && g.hasGlobStar(pattern)
	paths := g.filepaths(list, dir, matchtree)
	dirlen := len(dir)
	if dir != "" {
		dirlen++
	}
	for _, path := range paths {
		matched, err := g.Match(pattern, path[dirlen:])
		if err != nil {
			return m, err
		}
		if matched {
			m = append(m, path)
		}
	}
	return m, nil
}
844879
func (c *JSONConfigContainer) DefaultStrings(key string, defaultval []string) []string {
	if v := c.Strings(key); v != nil {
		return v
	}
	return defaultval
}
280518
func NewBFlags() *BFlags {
	return &BFlags{
		flags: make(map[string]*Flag),
		used:  make(map[string]*Flag),
	}
}
1135114
func (s *EnvSettings) AddFlagsTLS(fs *pflag.FlagSet) {
	fs.StringVar(&s.TLSServerName, "tls-hostname", s.TillerHost, "the server name used to verify the hostname on the returned certificates from the server")
	fs.StringVar(&s.TLSCaCertFile, "tls-ca-cert", DefaultTLSCaCert, "path to TLS CA certificate file")
	fs.StringVar(&s.TLSCertFile, "tls-cert", DefaultTLSCert, "path to TLS certificate file")
	fs.StringVar(&s.TLSKeyFile, "tls-key", DefaultTLSKeyFile, "path to TLS key file")
	fs.BoolVar(&s.TLSVerify, "tls-verify", DefaultTLSVerify, "enable TLS for request and verify remote")
	fs.BoolVar(&s.TLSEnable, "tls", DefaultTLSEnable, "enable TLS for request")
}
689659
func AddParams(urlString string, params map[string]string) (string, error) {
	parsedURL, err := url.Parse(urlString)
	if err != nil {
		return "", err
	}

	parameters := parsedURL.Query()
	for k, v := range params {
		parameters.Add(k, v)
	}
	parsedURL.RawQuery = parameters.Encode()

	return parsedURL.String(), nil
}
911988
func (s *SubsetFontObj) AddChars(txt string) error {
	for _, runeValue := range txt {
		if s.CharacterToGlyphIndex.KeyExists(runeValue) {
			continue
		}
		glyphIndex, err := s.CharCodeToGlyphIndex(runeValue)
		if err != nil {
			return err
		}
		s.CharacterToGlyphIndex.Set(runeValue, glyphIndex) // [runeValue] = glyphIndex
	}
	return nil
}
982094
func ByteStrings(a, b string) []Change {
	return Diff(len(a), len(b), &strings{a, b})
}
1218105
func (t *TagReplace) AddSpans(ctx context.Context, spans []*trace.Span) error {
	for _, s := range spans {
		if s.Name != nil {
			for _, r := range t.rules {
				nms := r.SubexpNames()
				oldName := *s.Name
				if ms := r.FindStringSubmatch(oldName); ms != nil {
					ims := r.FindStringSubmatchIndex(oldName)

					var newName []string
					var index = 0
					if s.Tags == nil {
						s.Tags = map[string]string{}
					}

					for i := 1; i < len(ms); i++ {
						s.Tags[nms[i]] = ms[i]
						newName = append(newName, oldName[index:ims[i*2]], "{", nms[i], "}")
						index = ims[i*2+1]
					}
					if index < len(oldName) {
						newName = append(newName, oldName[index:])
					}
					s.Name = pointer.String(strings.Join(newName, ""))
					if t.exitEarly {
						break
					}
				}
			}
		}
	}
	return t.next.AddSpans(ctx, spans)
}
1230197
func NewBFlagsWithArgs(args []string) *BFlags {
	flags := NewBFlags()
	flags.Args = args
	return flags
}