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

Function LVCanConvToString

value.go:53–60  ·  view source on GitHub ↗

LVCanConvToString returns true if a given LValue is a string or number otherwise false.

(v LValue)

Source from the content-addressed store, hash-verified

51// LVCanConvToString returns true if a given LValue is a string or number
52// otherwise false.
53func LVCanConvToString(v LValue) bool {
54 switch v.(type) {
55 case LString, LNumber:
56 return true
57 default:
58 return false
59 }
60}
61
62// LVAsNumber tries to convert a given LValue to a number.
63func LVAsNumber(v LValue) LNumber {

Callers 5

CheckStringMethod · 0.85
baseLoadFunction · 0.85
stringConcatFunction · 0.85
tableConcatFunction · 0.85
stringConcatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…