MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_snprintf

Function rt_snprintf

src/klibc/kstdio.c:28–38  ·  view source on GitHub ↗

* @brief This function will fill a formatted string to buffer. * * @param buf is the buffer to save formatted string. * * @param size is the size of buffer. * * @param fmt is the format parameters. * * @return The number of characters actually written to buffer. */

Source from the content-addressed store, hash-verified

26 * @return The number of characters actually written to buffer.
27 */
28int rt_snprintf(char *buf, rt_size_t size, const char *fmt, ...)
29{
30 rt_int32_t n = 0;
31 va_list args;
32
33 va_start(args, fmt);
34 n = rt_vsnprintf(buf, size, fmt, args);
35 va_end(args);
36
37 return n;
38}
39RTM_EXPORT(rt_snprintf);
40
41/**

Callers 15

msh_exec_scriptFunction · 0.85
cmd_mvFunction · 0.85
msh_exec_moduleFunction · 0.85
rt_udisk_runFunction · 0.85
_free_proc_dentryFunction · 0.85
sys_unameFunction · 0.85
rt_virtio_console_initFunction · 0.85
rt_virtio_gpu_initFunction · 0.85
rt_virtio_blk_initFunction · 0.85
rt_virtio_input_initFunction · 0.85
rt_virtio_net_initFunction · 0.85

Calls 1

rt_vsnprintfFunction · 0.70

Tested by 2

test_rs485Function · 0.68
test_rs485Function · 0.68