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

Function rt_sprintf

src/klibc/kstdio.c:67–77  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

65 * @return The number of characters actually written to buffer.
66 */
67int rt_sprintf(char *buf, const char *format, ...)
68{
69 rt_int32_t n = 0;
70 va_list arg_ptr;
71
72 va_start(arg_ptr, format);
73 n = rt_vsprintf(buf, format, arg_ptr);
74 va_end(arg_ptr);
75
76 return n;
77}
78RTM_EXPORT(rt_sprintf);
79
80#ifdef RT_KLIBC_USING_LIBC_VSNPRINTF

Callers 15

directory_delete_for_mshFunction · 0.85
directory_setattrFunction · 0.85
pci_child_bus_initFunction · 0.85
alloc_device_nameFunction · 0.85
block_readFunction · 0.85
nonblock_readFunction · 0.85
rt_can_openFunction · 0.85
ofw_pin_ctrl_confs_applyFunction · 0.85
_rym_send_beginFunction · 0.85
mq_openFunction · 0.85

Calls 1

rt_vsprintfFunction · 0.85

Tested by 2

test_cpusmpFunction · 0.68
synchronization_tcFunction · 0.68