// IsLocaleBetterThan returns true if c is a better locale match than o for the r configuration.
161029
func (c *ResTableConfig) IsLocaleBetterThan(o *ResTableConfig, r *ResTableConfig) bool {
	if r.Language == [2]uint8{} && r.Country == [2]uint8{} {
		// The request doesn't have a locale, so no resource is better
		// than the other.
		return false
	}

	if c.Language == [2]uint8{} && c.Country == [2]uint8{} && o.Language == [2]uint8{} && o.Country == [2]uint8{} {
		// The locales parts of both resources are empty, so no one is better
		// than the other.
		return false
	}

	if c.Language != o.Language {
		// The languages of the two resources are not the same.

		// the US English resource have traditionally lived for most apps.
		if r.Language == [2]uint8{'e', 'n'} {
			if r.Country == [2]uint8{'U', 'S'} {
				if c.Language != [2]uint8{} {
					return c.Country == [2]uint8{} || c.Country == [2]uint8{'U', 'S'}
				}
				return !(c.Country == [2]uint8{} || c.Country == [2]uint8{'U', 'S'})
			}
		}
		return c.Language != [2]uint8{}
	}

	if c.Country != o.Country {
		return c.Country != [2]uint8{}
	}

	return false
}
957873
func (c *ChannelsInfoCall) IncludeLocale(includeLocale bool) *ChannelsInfoCall {
	c.includeLocale = includeLocale
	return c
}
1307683
func matchLocalFileAndUnit(file string, su *schema.Unit) (bool, error) {
	a := schema.MapSchemaUnitOptionsToUnitFile(su.Options)

	_, err := os.Stat(file)
	if err != nil {
		return false, err
	}

	b, err := getUnitFromFile(file)
	if err != nil {
		return false, err
	}

	return unit.MatchUnitFiles(a, b), nil
}
205275
func SetLocale(category uint, locale string) string {
	clocale := C.CString(locale)
	defer C.free(unsafe.Pointer(clocale))

	return C.GoString(C.setlocale(C.int(category), clocale))
}
86062
func (c *UsersListCall) IncludeLocale(includeLocale bool) *UsersListCall {
	c.includeLocale = includeLocale
	return c
}
257312
func IsLocalHost(hostport string) bool {
	host, _, err := net.SplitHostPort(hostport)
	if err != nil {
		return false
	}
	switch {
	case host == "localhost", host == "":
	case net.ParseIP(host).IsLoopback():

	default:
		return false
	}
	return true
}
674436
func (t *Track) IsLocal() bool {
	local := C.sp_track_is_local(
		t.session.sp_session,
		t.sp_track,
	)
	return local == 1
}
432450
func (s *DescribeExclusionsInput) SetLocale(v string) *DescribeExclusionsInput {
	s.Locale = &v
	return s
}
872130
func (p *Peer) IsLocal() bool {
	hostname, err := os.Hostname()
	if err != nil {
		return false
	}

	name := strings.Split(p.Hostname, ".")[0]
	return name == hostname
}
521219
func (thread *Thread) SetLocal(key string, value interface{}) {
	if thread.locals == nil {
		thread.locals = make(map[string]interface{})
	}
	thread.locals[key] = value
}
1077657
func (s *IndicesGetSettingsService) Local(local bool) *IndicesGetSettingsService {
	s.local = &local
	return s
}
1207032
func (s *IndicesExistsService) Local(local bool) *IndicesExistsService {
	s.local = &local
	return s
}
878176
func IsLocal(na *wire.NetAddress) bool {
	return na.IP.IsLoopback() || zero4Net.Contains(na.IP)
}
338369
func DefaultLocalConfigPath() (string, error) {
	dir, err := DefaultConfigDir()
	if err != nil {
		return "", err
	}
	return path.Join(dir, "config"), nil
}
155882
func readLocalCharsets() {
	csdata, err := readFile("charsets.json")
	if err != nil {
		fmt.Fprintf(os.Stderr, "charset: cannot open \"charsets.json\": %v\n", err)
		return
	}

	var entries map[string]charsetEntry
	err = json.Unmarshal(csdata, &entries)
	if err != nil {
		fmt.Fprintf(os.Stderr, "charset: cannot decode config file: %v\n", err)
	}
	for name, e := range entries {
		class := classes[e.Class]
		if class == nil {
			continue
		}
		name = NormalizedName(name)
		for i, a := range e.Aliases {
			e.Aliases[i] = NormalizedName(a)
		}
		cs := &localCharset{
			Charset: Charset{
				Name:    name,
				Aliases: e.Aliases,
				Desc:    e.Desc,
				NoFrom:  class.from == nil,
				NoTo:    class.to == nil,
			},
			arg:   e.Arg,
			class: class,
		}
		localCharsets[cs.Name] = cs
		for _, a := range cs.Aliases {
			localCharsets[a] = cs
		}
	}
}
1227865
func (s *Ethereum) isLocalBlock(block *types.Block) bool {
	author, err := s.engine.Author(block.Header())
	if err != nil {
		log.Warn("Failed to retrieve block author", "number", block.NumberU64(), "hash", block.Hash(), "err", err)
		return false
	}
	// Check whether the given address is etherbase.
	s.lock.RLock()
	etherbase := s.etherbase
	s.lock.RUnlock()
	if author == etherbase {
		return true
	}
	// Check whether the given address is specified by `txpool.local`
	// CLI flag.
	for _, account := range s.config.TxPool.Locals {
		if account == author {
			return true
		}
	}
	return false
}
816622
func IsLocalizable(scope *gorm.Scope) (IsLocalizable bool) {
	if scope.GetModelStruct().ModelType == nil {
		return false
	}
	_, IsLocalizable = reflect.New(scope.GetModelStruct().ModelType).Interface().(l10nInterface)
	return
}