MCPcopy Index your code
hub / github.com/yuin/gopher-lua / LVAsString

Function LVAsString

value.go:42–49  ·  view source on GitHub ↗

LVAsString returns string representation of a given LValue if the LValue is a string or number, otherwise an empty string.

(v LValue)

Source from the content-addressed store, hash-verified

40// LVAsString returns string representation of a given LValue
41// if the LValue is a string or number, otherwise an empty string.
42func LVAsString(v LValue) string {
43 switch sn := v.(type) {
44 case LString, LNumber:
45 return sn.String()
46 default:
47 return ""
48 }
49}
50
51// LVCanConvToString returns true if a given LValue is a string or number
52// otherwise false.

Callers 9

fileWriteAuxFunction · 0.85
stringConcatFunction · 0.85
strGsubTableFunction · 0.85
strGsubFuncFunction · 0.85
stringConcatFunction · 0.85
ToStringMethod · 0.85
ConcatMethod · 0.85
ToStringMethod · 0.85
ConcatMethod · 0.85

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…