MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / char_repeat

Function char_repeat

test/core/test_stdio_locking.c:22–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#endif
21
22char *char_repeat(int n, char c) {
23 char *dest = malloc(n + 1);
24 memset(dest, c, n);
25 dest[n] = '\0';
26 return dest;
27}
28
29void thread_func() {
30 char *msg = char_repeat(100, 'a');

Callers 1

thread_funcFunction · 0.85

Calls 2

memsetFunction · 0.85
mallocFunction · 0.70

Tested by

no test coverage detected