MCPcopy
hub / github.com/google/mangle / String

Function String

ast/ast.go:303–305  ·  view source on GitHub ↗

String constructs a string constant.

(str string)

Source from the content-addressed store, hash-verified

301
302// String constructs a string constant.
303func String(str string) Constant {
304 return Constant{StringType, str, int64(hashBytes([]byte(str))), nil, nil}
305}
306
307// Bytes constructs a byte string constant.
308func Bytes(bytes []byte) Constant {

Callers 15

DeclsMethod · 0.92
TestDeclsFunction · 0.92
TestDeclsErrorsFunction · 0.92
TestClausesFunction · 0.92
TestExtractFunction · 0.92
TestDisplayStringFunction · 0.92
TestListMapStructFunction · 0.92
ExecuteQueryMethod · 0.92
TestEvalExternalFunction · 0.92
BenchmarkJoinFunction · 0.92

Calls 1

hashBytesFunction · 0.85

Tested by 15

TestDeclsFunction · 0.74
TestDeclsErrorsFunction · 0.74
TestClausesFunction · 0.74
TestExtractFunction · 0.74
TestDisplayStringFunction · 0.74
TestListMapStructFunction · 0.74
ExecuteQueryMethod · 0.74
TestEvalExternalFunction · 0.74
BenchmarkJoinFunction · 0.74
TestInclusionCheckFunction · 0.74