LVAsString returns string representation of a given LValue if the LValue is a string or number, otherwise an empty string.
(v LValue)
| 40 | // LVAsString returns string representation of a given LValue |
| 41 | // if the LValue is a string or number, otherwise an empty string. |
| 42 | func 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. |
no test coverage detected
searching dependent graphs…