// IsDataURI checks if a string is base64 encoded data URI such as an image
198869
func IsDataURI(str string) bool {
	dataURI := strings.Split(str, ",")
	if !rxDataURI.MatchString(dataURI[0]) {
		return false
	}
	return IsBase64(dataURI[1])
}
549746
func isImageIDPrefix(imageID, possiblePrefix string) bool {
	if strings.HasPrefix(imageID, possiblePrefix) {
		return true
	}

	if i := strings.IndexRune(imageID, ':'); i >= 0 {
		return strings.HasPrefix(imageID[i+1:], possiblePrefix)
	}

	return false
}
1287771
func (uri *redirectURI) isValid() bool {
	return len(uri.scheme) > 0 && len(uri.host) > 0
}
969374
func ValidateURIs(uris ...string) Validatable {
	return func() error {
		for i := range uris {
			uri := uris[i]
			if len(uri) < 7 {
				return errors.Wrapf(ErrInvalidURI, "%s at index %d", uris[i], i)
			}
			schema := uri[:6]
			if schema != "tcp://" && schema != "udp://" {
				return errors.Wrapf(ErrInvalidURI, "%s at index %d", uris[i], i)
			}
			if _, err := url.Parse(uri[6:]); err != nil {
				return errors.Wrapf(ErrInvalidURI, "%s at index %d", uris[i], i)
			}
		}
		return nil
	}
}
74203
func (t *Loader) IsBinary() bool {
	return t.AssetFn != nil && t.NamesFn != nil
}
1065997
func isMultipart(r *http.Request) bool {
	contentType := r.Header.Get("Content-Type")
	return strings.HasPrefix(contentType, "multipart/form-data")
}
1040867
func (k RRSetKey) QueryURI(offset int) string {
	// TODO: find a more appropriate place to set "" to "ANY"
	if k.Type == "" {
		k.Type = "ANY"
	}
	return fmt.Sprintf("%s?offset=%d", k.URI(), offset)
}
913843
func IsImage(buf []byte) bool {
	kind, _ := Image(buf)
	return kind != types.Unknown
}
1070411
func IsURL(u string) bool {
	var parsedURL *url.URL
	var err error

	parsedURL, err = url.ParseRequestURI(u)
	if err == nil {
		if parsedURL != nil && parsedURL.Host != "" {
			return true
		}
	}
	return false
}
910589
func (l *State) IsUserData(index int) bool {
	_, ok := l.indexToValue(index).(*userData)
	return ok
}
589763
func (f URIReferenceFormatChecker) IsFormat(input interface{}) bool {
	asString, ok := input.(string)
	if !ok {
		return false
	}

	_, err := url.Parse(asString)
	return err == nil && !strings.Contains(asString, `\`)
}
265817
func (f DefaultDownloader) GetISOFileURI(isoURL string) string {
	urlObj, err := url.Parse(isoURL)
	if err != nil {
		return isoURL
	}
	if urlObj.Scheme == fileScheme {
		return isoURL
	}
	isoPath := filepath.Join(constants.GetMinipath(), "cache", "iso", filepath.Base(isoURL))
	// As this is a file URL there should be no backslashes regardless of platform running on.
	return "file://" + filepath.ToSlash(isoPath)
}
1288349
func IsRsaPub(str string, params ...string) bool {
	if len(params) == 1 {
		len, _ := ToInt(params[0])
		return IsRsaPublicKey(str, int(len))
	}

	return false
}
1332802
func IsHTTPError(err error) bool {
	cause := errors.Cause(err)
	if nErr, ok := cause.(HTTPError); ok {
		return nErr.HTTPError()
	}

	return false
}
867464
func (s *RDSDataSpec) SetDataSchemaUri(v string) *RDSDataSpec {
	s.DataSchemaUri = &v
	return s
}
847092
func (s *Grantee) SetURI(v string) *Grantee {
	s.URI = &v
	return s
}
503839
func IsJaeum(r rune) bool {
	switch {
	case G <= r && r <= H:
		return true
	case IsLead(r):
		return true
	case IsTail(r):
		return true
	}
	return false
}