MCPcopy Create free account
hub / github.com/F-Stack/f-stack / memmapchars

Function memmapchars

app/redis-6.2.6/src/util.c:262–272  ·  view source on GitHub ↗

Modify the buffer replacing all occurrences of chars from the 'from' * set with the corresponding char in the 'to' set. Always returns s. */

Source from the content-addressed store, hash-verified

260 * set with the corresponding char in the 'to' set. Always returns s.
261 */
262char *memmapchars(char *s, size_t len, const char *from, const char *to, size_t setlen) {
263 for (size_t j = 0; j < len; j++) {
264 for (size_t i = 0; i < setlen; i++) {
265 if (s[j] == from[i]) {
266 s[j] = to[i];
267 break;
268 }
269 }
270 }
271 return s;
272}
273
274/* Return the number of digits of 'v' when converted to string in radix 10.
275 * See ll2string() for more information. */

Callers 1

getSafeInfoStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected