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

Method Format

value.go:101–112  ·  view source on GitHub ↗

fmt.Formatter interface

(f fmt.State, c rune)

Source from the content-addressed store, hash-verified

99
100// fmt.Formatter interface
101func (st LString) Format(f fmt.State, c rune) {
102 switch c {
103 case 'd', 'i':
104 if nm, err := parseNumber(string(st)); err != nil {
105 defaultFormat(nm, f, 'd')
106 } else {
107 defaultFormat(string(st), f, 's')
108 }
109 default:
110 defaultFormat(string(st), f, c)
111 }
112}
113
114func (nm LNumber) String() string {
115 if isInteger(nm) {

Callers 1

strftimeFunction · 0.45

Calls 2

parseNumberFunction · 0.85
defaultFormatFunction · 0.85

Tested by

no test coverage detected