** change all characters 'from' in buffer to 'to' */
| 214 | ** change all characters 'from' in buffer to 'to' |
| 215 | */ |
| 216 | static void buffreplace(LexState *ls, char from, char to) { |
| 217 | if (from != to) { |
| 218 | size_t n = luaZ_bufflen(ls->buff); |
| 219 | char *p = luaZ_buffer(ls->buff); |
| 220 | while (n--) |
| 221 | if (p[n] == from) p[n] = to; |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | |
| 226 | /* |
no outgoing calls
no test coverage detected