// AfterText allows you to write your own functions for inspecting the body of the response.
// You are also provided with the Frisby object.
//
// The function signiture is AfterTextFunc
//  type AfterTextFunc func(F *Frisby, text string, err error)
//
176055
func (F *Frisby) AfterText(foo AfterTextFunc) *Frisby {
	text, err := F.Resp.Text()
	foo(F, text, err)
	return F
}
1134539
func TextResponse(r *http.Request, text string) *http.Response {
	return NewResponse(r, ContentTypeText, http.StatusAccepted, text)
}
594511
func (fci *FakeCallInfo) Text() string {
	return fmt.Sprintf("%s:%s(fakeRPC)", fci.Remote, fci.Method)
}
585884
func lexText(l *lexer) stateFn {
	for {
		if strings.HasPrefix(l.input[l.pos:], l.leftDelim) {
			if l.pos > l.start {
				l.emit(itemText)
			}
			return lexLeftDelim
		}
		if l.next() == eof {
			break
		}
	}
	// Correctly reached EOF.
	if l.pos > l.start {
		l.emit(itemText)
	}
	l.emit(itemEOF)
	return nil
}
266073
func (e *Event) Text() (string, error) {
	if e.Type != TextMessage {
		return "", errors.New("Event.Text() called on non-TextMessage event")
	}
	bts, err := ioutil.ReadAll(e)
	return string(bts), err
}
776215
func (i *FuncInterceptor) AfterTaskCanceled(activity *swf.PollForActivityTaskOutput, details string) {
	if i.AfterTaskCanceledFn != nil {
		i.AfterTaskCanceledFn(activity, details)
	}
}
795958
func (c *ChatPostMessageCall) Text(text string) *ChatPostMessageCall {
	c.text = text
	return c
}
741010
func (a *defaultAdapter) Text(res *Response) ([]byte, error) {
	r, err := res.Reader()
	if err != nil {
		return nil, err
	}
	text, err := ioutil.ReadAll(r)
	if err != nil {
		return nil, err
	}
	return text, nil
}
1177412
func (c *Callbacks) OnCUserMessageSayText(fn func(*dota.CUserMessageSayText) error) {
	c.onCUserMessageSayText = append(c.onCUserMessageSayText, fn)
}
753705
func lexText(l *lexer) stateFn {
	for {
		if i := strings.IndexByte(l.input[l.pos:], l.leftDelim[0]); i == -1 {
			l.pos = Pos(len(l.input))
			break
		} else {
			l.pos += Pos(i)
			if strings.HasPrefix(l.input[l.pos:], l.leftDelim) {
				if l.pos > l.start {
					l.emit(itemText)
				}
				return lexLeftDelim
			}
			if strings.HasPrefix(l.input[l.pos:], leftComment) {
				if l.pos > l.start {
					l.emit(itemText)
				}
				return lexComment
			}
		}
		if l.next() == eof {
			break
		}
	}
	// Correctly reached EOF.
	if l.pos > l.start {
		l.emit(itemText)
	}
	l.emit(itemEOF)
	return nil
}
3043
func (s S) After(f func()) {
	s("", f, func(c *config) { c.after = true })
}
1104341
func (line *Line) Text() string {
	if len(line.Args) > 0 {
		return line.Args[len(line.Args)-1]
	}
	return ""
}
278046
func (F *Frisby) Post(url string) *Frisby {
	F.Method = "POST"
	F.Url = url
	return F
}
135862
func (r *Response) Before(fn func()) {
	r.beforeFuncs = append(r.beforeFuncs, fn)
}
982622
func (rr *rasterRenderer) Text(body string, x, y int) {
	xf, yf := rr.getCoords(x, y)
	rr.gc.SetFont(rr.s.Font)
	rr.gc.SetFontSize(rr.s.FontSize)
	rr.gc.SetFillColor(rr.s.FontColor)
	rr.gc.CreateStringPath(body, float64(xf), float64(yf))
	rr.gc.Fill()
}
299917
func (c *ChatUpdateCall) Text(text string) *ChatUpdateCall {
	c.text = text
	return c
}
308638
func (r *Response) Text(text string) error {
	return r.Raw([]byte(text))
}