(L *LState, m *pm.MatchData, str string, idx int)
| 188 | } |
| 189 | |
| 190 | func capturedString(L *LState, m *pm.MatchData, str string, idx int) string { |
| 191 | checkCaptureIndex(L, m, idx) |
| 192 | if idx >= m.CaptureLength() && idx == 2 { |
| 193 | idx = 0 |
| 194 | } |
| 195 | if m.IsPosCapture(idx) { |
| 196 | return fmt.Sprint(m.Capture(idx)) |
| 197 | } else { |
| 198 | return str[m.Capture(idx):m.Capture(idx+1)] |
| 199 | } |
| 200 | |
| 201 | } |
| 202 | |
| 203 | func strGsubDoReplace(str string, info []replaceInfo) string { |
| 204 | offset := 0 |
no test coverage detected
searching dependent graphs…