const TCHAR* <spanclass="arg">fmt</span>, <spanclass="c">/* [IN] Format stirng */</span>
...
);
</pre>
</div>
<divclass="para arg">
<h4>Parameters</h4>
<dlclass="par">
<dt>fp</dt>
<dd>Pointer to the open file object structure.</dd>
<dt>fmt</dt>
<dd>Pointer to the null terminated format string. The terminator charactor will not be written.</dd>
<dt>...</dt>
<dd>Optional arguments...</dd>
</dl>
</div>
<divclass="para ret">
<h4>Return Values</h4>
<p>When the function succeeded, it returns number of characters written. When the function failed due to disk full or any error, an <tt>EOF (-1)</tt> will be returned.</p>
<p>This is a wrapper function of <ahref="write.html"><tt>f_write</tt></a> function. Available when <tt>_FS_READONLY == 0</tt> and <tt>_USE_STRFUNC</tt> is 1 or 2. When it is set to 2, <tt>'\n'</tt>s contained in the output are converted to <tt>'\r'+'\n'</tt>.</p>
<p>When FatFs is configured to Unicode API (<tt>_LFN_UNICODE == 1</tt>), data types on the srting fuctions, <tt>f_putc</tt>, <tt>f_puts</tt>, <tt>f_printf</tt> and <tt>f_gets</tt> function, is also switched to Unicode. The character encoding on the file to be read/written via those functions is selected by <tt>_STRF_ENCODE</tt> option.</p>