// DGettext is like Gettext(), but looks up the message in the specified
// domain.
541418
func DGettext(domain string, msgid string) string {
	cdomain := cDomainName(domain)
	defer C.free(unsafe.Pointer(cdomain))

	cmsgid := C.CString(msgid)
	defer C.free(unsafe.Pointer(cmsgid))

	return C.GoString(C.dgettext(cdomain, cmsgid))
}
404953
func DCNGettext(domainname string, msgid string, msgidPlural string, n uint64, category uint) string {
	cdomainname := cDomainName(domainname)
	cmsgid := C.CString(msgid)
	cmsgidPlural := C.CString(msgidPlural)

	defer func() {
		C.free(unsafe.Pointer(cdomainname))
		C.free(unsafe.Pointer(cmsgid))
		C.free(unsafe.Pointer(cmsgidPlural))
	}()

	return C.GoString(C.dcngettext(cdomainname, cmsgid, cmsgidPlural, C.ulong(n), C.int(category)))
}
1304811
func (c *Ctx) Text(code int, s string) error {
	return c.TextBytes(code, []byte(s))
}
28895
func (page *Page) getTitle(text []byte) error {
	startTag := []byte("<title>")
	startIndex := bytes.Index(text, startTag)

	endTag := []byte("</title>")
	endIndex := bytes.Index(text, endTag)

	if startIndex != -1 && endIndex != -1 {
		title := text[startIndex+len(startTag) : endIndex]

		if len(title) < 1 || !isTitle(title) {
			return ErrTitleNotFound
		}

		page.Title = string(title)
	} else {
		return ErrTitleNotFound
	}

	return nil
}
201433
func (r *RepositoryContentFileOptions) GetMessage() string {
	if r == nil || r.Message == nil {
		return ""
	}
	return *r.Message
}
841623
func NGettext(msgid string, msgidPlural string, n uint64) string {
	cmsgid := C.CString(msgid)
	defer C.free(unsafe.Pointer(cmsgid))

	cmsgidPlural := C.CString(msgidPlural)
	defer C.free(unsafe.Pointer(cmsgidPlural))

	return C.GoString(C.ngettext(cmsgid, cmsgidPlural, C.ulong(n)))
}
1122441
func (Ctx *Context) ConsoleGetTty(id Domid, consNum int, conType ConsoleType) (path string, err error) {
	err = Ctx.CheckOpen()
	if err != nil {
		return
	}

	var cpath *C.char
	ret := C.libxl_console_get_tty(Ctx.ctx, C.uint32_t(id), C.int(consNum), C.libxl_console_type(conType), &cpath)
	if ret != 0 {
		err = Error(-ret)
		return
	}
	defer C.free(cpath)

	path = C.GoString(cpath)
	return
}
1231514
func (s *SearchSource) GlobalSuggestText(text string) *SearchSource {
	s.globalSuggestText = text
	return s
}
862665
func (c *CheckRunAnnotation) GetMessage() string {
	if c == nil || c.Message == nil {
		return ""
	}
	return *c.Message
}
808577
func (l *Locale) GetC(str, ctx string, vars ...interface{}) string {
	return l.GetDC(l.GetDomain(), str, ctx, vars...)
}
877374
func GetND(dom, str, plural string, n int, vars ...interface{}) string {
	// Try to load default package Locale storage
	loadStorage(false)

	// Return Translation
	globalConfig.RLock()

	if _, ok := globalConfig.storage.Domains[dom]; !ok {
		globalConfig.storage.AddDomain(dom)
	}

	tr := globalConfig.storage.GetND(dom, str, plural, n, vars...)
	globalConfig.RUnlock()

	return tr
}
120678
func DPNGettext(domain, msgctxt, msgid, msgidPlural string, n int) string {
	return defaultManager.DPNGettext(domain, msgctxt, msgid, msgidPlural, n)
}
717865
func (c *Connection) ObjectGetString(container string, objectName string) (contents string, err error) {
	var buf bytes.Buffer
	_, err = c.ObjectGet(container, objectName, &buf, true, nil)
	contents = buf.String()
	return
}
430942
func (m *Descriptor) GetMessage(name string) *Descriptor {
	for _, msg := range m.GetMessages() {
		// can lookup by name or message prefixed name (qualified)
		if msg.GetName() == name || msg.GetLongName() == name {
			return msg
		}
	}

	return nil
}
775508
func (s *SearchService) GlobalSuggestText(globalText string) *SearchService {
	s.searchSource = s.searchSource.GlobalSuggestText(globalText)
	return s
}
1097954
func GetN(str, plural string, n int, vars ...interface{}) string {
	return GetND(GetDomain(), str, plural, n, vars...)
}
264052
func FindText(input *html.Node) (data string) {
	var buffer string
	for c := input.FirstChild; c != nil; c = c.NextSibling {
		if c.Parent.DataAtom == input.DataAtom && c.Type == html.TextNode {
			buffer = strings.TrimSpace(c.Data)
			if len(buffer) > 0 {
				data += " " + buffer
			}
		}
		FindText(c)
	}
	return strings.TrimSpace(data)
}