// AddPrefix will add the Windows long path prefix to the path provided if
// it does not already have it.
162709
func AddPrefix(path string) string {
	if !strings.HasPrefix(path, Prefix) {
		path = Prefix + path
	}
	return path
}
1318814
func (b *Builder) PathPrefix(pathPrefix string) *Builder {
	b.pathPrefix = pathPrefix
	return b
}
446543
func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput {
	s.Prefix = &v
	return s
}
136650
func (s *TimecodeBurnin) SetPrefix(v string) *TimecodeBurnin {
	s.Prefix = &v
	return s
}
420420
func OptionPrefix(x string) Option {
	return func(p *Prompt) error {
		p.renderer.prefix = x
		return nil
	}
}
1096189
func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator {
	s.Prefix = &v
	return s
}
1168281
func (s *ReplicationRuleFilter) SetPrefix(v string) *ReplicationRuleFilter {
	s.Prefix = &v
	return s
}
488810
func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter {
	s.Prefix = &v
	return s
}
833528
func (s *JobReport) SetPrefix(v string) *JobReport {
	s.Prefix = &v
	return s
}
1026752
func (cl *CoLog) SetPrefix(prefix string) {
	cl.mu.Lock()
	defer cl.mu.Unlock()

	cl.prefix = prefix
}
800892
func (addr DevAddr) WithPrefix(prefix DevAddrPrefix) (prefixed DevAddr) {
	k := uint(prefix.Length)
	for i := 0; i < 4; i++ {
		if k >= 8 {
			prefixed[i] = prefix.DevAddr[i] & 0xff
			k -= 8
			continue
		}
		prefixed[i] = (prefix.DevAddr[i] & ^byte(0xff>>k)) | (addr[i] & byte(0xff>>k))
		k = 0
	}
	return
}
213127
func (p *PathManager) RemovePathPrefix(prefix string) {
	p.l.Lock()
	defer p.l.Unlock()

	// We trim any trailing *, but we don't touch whether it is a trailing
	// slash or not since we want to be able to ignore prefixes that fully
	// specify a file
	p.paths, _ = p.paths.DeletePrefix([]byte(strings.TrimSuffix(prefix, "*")))
}
172452
func hasPathPrefix(x, y string) bool {
	return x == y || strings.HasPrefix(x, y) && (strings.HasSuffix(y, "/") || strings.HasPrefix(x[len(y):], "/"))
}
137132
func SplitPrefix(path string) ([]string, string) {
	parts := strings.SplitN(path, ":", 2)
	if len(parts) == 2 && len(parts[0]) > 0 {
		return strings.Split(parts[0], "."), parts[1]
	}
	return nil, path
}
460516
func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator {
	s.Prefix = &v
	return s
}
117231
func (s *ListAttachedRolePoliciesInput) SetPathPrefix(v string) *ListAttachedRolePoliciesInput {
	s.PathPrefix = &v
	return s
}
1335972
func (s *ExtendedS3DestinationUpdate) SetPrefix(v string) *ExtendedS3DestinationUpdate {
	s.Prefix = &v
	return s
}