MCPcopy Create free account
hub / github.com/a-h/lexical / String

Function String

parse/string.go:6–10  ·  view source on GitHub ↗

String captures a specific string.

(s string)

Source from the content-addressed store, hash-verified

4
5// String captures a specific string.
6func String(s string) Function {
7 return func(pi Input) Result {
8 return parseString(pi, s)
9 }
10}
11
12func parseString(pi Input, s string) Result {
13 name := "string: '" + s + "'"

Callers 7

scanner_test.goFile · 0.92
main.goFile · 0.92
TestStringFunction · 0.85
BenchmarkStringFunction · 0.85
TestAllFunction · 0.85
TestStringUntilFunction · 0.85
TestStringUntilInputFunction · 0.85

Calls 1

parseStringFunction · 0.85

Tested by 5

TestStringFunction · 0.68
BenchmarkStringFunction · 0.68
TestAllFunction · 0.68
TestStringUntilFunction · 0.68
TestStringUntilInputFunction · 0.68