MCPcopy
hub / github.com/andeya/pholcus / Text

Method Text

common/goquery/property.go:54–62  ·  view source on GitHub ↗

Text gets the combined text contents of each element in the set of matched elements, including their descendants.

()

Source from the content-addressed store, hash-verified

52// Text gets the combined text contents of each element in the set of matched
53// elements, including their descendants.
54func (s *Selection) Text() string {
55 var buf bytes.Buffer
56
57 // Slightly optimized vs calling Each: no single selection object created
58 for _, n := range s.Nodes {
59 buf.WriteString(getNodeText(n))
60 }
61 return buf.String()
62}
63
64// Size is an alias for Length.
65func (s *Selection) Size() int {

Callers 15

zolpc.goFile · 0.80
taobao.goFile · 0.80
shunfenghaitao.goFile · 0.80
lewa.goFile · 0.80
avatar.goFile · 0.80
car_home.goFile · 0.80
weibo_fans.goFile · 0.80
kaola.goFile · 0.80
taobaosearch.goFile · 0.80
people.goFile · 0.80

Calls 2

getNodeTextFunction · 0.85
StringMethod · 0.65

Tested by 8

TestIssue103Function · 0.64
TestTextFunction · 0.64
TestText2Function · 0.64
TestText3Function · 0.64
TestNbspFunction · 0.64
BenchmarkTextFunction · 0.64
ExampleFunction · 0.64