MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / buffreplace

Function buffreplace

src/Chain/libraries/glua/llex.cpp:216–223  ·  view source on GitHub ↗

** change all characters 'from' in buffer to 'to' */

Source from the content-addressed store, hash-verified

214** change all characters 'from' in buffer to 'to'
215*/
216static 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/*

Callers 2

trydecpointFunction · 0.85
read_numeralFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected