<!-- This comment will put IE 6, 7 and 8 in quirks mode --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>ICU 4.4.1: ustdio.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javaScript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body onload='searchBox.OnSelectItem(0);'> <!-- Generated by Doxygen 1.6.2-20100208 --> <script type="text/javascript"><!-- var searchBox = new SearchBox("searchBox", "search",false,'Search'); --></script> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <img id="MSearchSelect" src="search/search.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </div> </li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> </div> <div class="contents"> <h1>ustdio.h File Reference</h1> <p>C API: Unicode stdio-like API. <a href="#_details">More...</a></p> <code>#include <stdio.h></code><br/> <code>#include <stdarg.h></code><br/> <code>#include "<a class="el" href="utypes_8h_source.html">unicode/utypes.h</a>"</code><br/> <code>#include "<a class="el" href="ucnv_8h_source.html">unicode/ucnv.h</a>"</code><br/> <code>#include "<a class="el" href="utrans_8h_source.html">unicode/utrans.h</a>"</code><br/> <code>#include "<a class="el" href="localpointer_8h_source.html">unicode/localpointer.h</a>"</code><br/> <p><a href="ustdio_8h_source.html">Go to the source code of this file.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Defines</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#ad2abb9cdcd84b75fef26348fd540e7c9">U_EOF</a> 0xFFFF</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">When an end of file is encountered, this value can be returned. <a href="#ad2abb9cdcd84b75fef26348fd540e7c9"></a><br/></td></tr> <tr><td colspan="2"><h2>Typedefs</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Forward declaration of a Unicode-aware file. <a href="#ae90a658afbabf4e36c17dd4eeb95f1a6"></a><br/></td></tr> <tr><td colspan="2"><h2>Enumerations</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a9e9aaa695e1c052127aae9a75f082155">UFileDirection</a> { <b>U_READ</b> = 1, <b>U_WRITE</b> = 2, <b>U_READWRITE</b> = 3 }</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight"><p>Enum for which direction of stream a transliterator applies to. </p> <a href="ustdio_8h.html#a9e9aaa695e1c052127aae9a75f082155">More...</a><br/></td></tr> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a921519fbcb17c3e3c020b2871afb8b23">u_fopen</a> (const char *filename, const char *perm, const char *locale, const char *codepage)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Open a UFILE. <a href="#a921519fbcb17c3e3c020b2871afb8b23"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a97b3a4c3639271188f378bf87e2c957d">u_finit</a> (FILE *f, const char *locale, const char *codepage)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Open a UFILE on top of an existing FILE* stream. <a href="#a97b3a4c3639271188f378bf87e2c957d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#ae87c57f37b30b724d24e003ced290370">u_fadopt</a> (FILE *f, const char *locale, const char *codepage)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Open a UFILE on top of an existing FILE* stream. <a href="#ae87c57f37b30b724d24e003ced290370"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a8dbdc3a52164c1f207d7731105b85982">u_fstropen</a> (<a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *stringBuf, int32_t capacity, const char *locale)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a UFILE that can be used for localized formatting or parsing. <a href="#a8dbdc3a52164c1f207d7731105b85982"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#ab3241cbe6c98cc23a1a164b19d9f2d84">u_fclose</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *file)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Close a UFILE. <a href="#ab3241cbe6c98cc23a1a164b19d9f2d84"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#aebc8584d59bee9aa7a1d44391fb329e4">u_feof</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Tests if the UFILE is at the end of the file stream. <a href="#aebc8584d59bee9aa7a1d44391fb329e4"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#ab80062155b58334f8f85e6b5b4e93521">u_fflush</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *file)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Flush output of a UFILE. <a href="#ab80062155b58334f8f85e6b5b4e93521"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#af58b8c15c4ef981e1b7cc45e39eb75b8">u_frewind</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *file)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Rewind the file pointer to the beginning of the file. <a href="#af58b8c15c4ef981e1b7cc45e39eb75b8"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">FILE * </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a254f86265efa9b9e8e9683aa5bccdb7c">u_fgetfile</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the FILE* associated with a UFILE. <a href="#a254f86265efa9b9e8e9683aa5bccdb7c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a708f57f3b9560e13e96d5af5753d8633">u_fgetlocale</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *file)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the locale whose conventions are used to format and parse output. <a href="#a708f57f3b9560e13e96d5af5753d8633"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#adb774e3149c9a0da75bda57a71098935">u_fsetlocale</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *file, const char *locale)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the locale whose conventions will be used to format and parse output. <a href="#adb774e3149c9a0da75bda57a71098935"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a877318646295602392de8a858953e8ff">u_fgetcodepage</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *file)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the codepage in which data is written to and read from the UFILE. <a href="#a877318646295602392de8a858953e8ff"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a7381b833b6835034008985da1fb9acc2">u_fsetcodepage</a> (const char *codepage, <a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *file)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the codepage in which data will be written to and read from the UFILE. <a href="#a7381b833b6835034008985da1fb9acc2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="ucnv__err_8h.html#a0c2dcfbf71ad577f5285869e1ceb26b1">UConverter</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a1a03b63365f381fa3baf030d7dfc9392">u_fgetConverter</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns an alias to the converter being used for this file. <a href="#a1a03b63365f381fa3baf030d7dfc9392"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#aace6d50c4e497147fa383f36619b6691">u_fprintf</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f, const char *patternSpecification,...)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write formatted data to a UFILE. <a href="#aace6d50c4e497147fa383f36619b6691"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a8e3b9d93385a94595f3bdf8d5e992427">u_vfprintf</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f, const char *patternSpecification, va_list ap)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write formatted data to a UFILE. <a href="#a8e3b9d93385a94595f3bdf8d5e992427"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a391d37061930a7ad8c33df8d5432ce12">u_fprintf_u</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *patternSpecification,...)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write formatted data to a UFILE. <a href="#a391d37061930a7ad8c33df8d5432ce12"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a67654b30a7ab9a23c61be373e35941f8">u_vfprintf_u</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *patternSpecification, va_list ap)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write formatted data to a UFILE. <a href="#a67654b30a7ab9a23c61be373e35941f8"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a2e58874c36723ec9d01555f194c2116d">u_fputs</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *s, <a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write a Unicode to a UFILE. <a href="#a2e58874c36723ec9d01555f194c2116d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a41f2cddc2702c115848b4fbdb48c3794">u_fputc</a> (<a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> uc, <a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write a UChar to a UFILE. <a href="#a41f2cddc2702c115848b4fbdb48c3794"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#abb0b2946239f10903e865d910091514b">u_file_write</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *ustring, int32_t count, <a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write Unicode to a UFILE. <a href="#abb0b2946239f10903e865d910091514b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a18444caddf68d1d161fa13b2edd1a9c5">u_fscanf</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f, const char *patternSpecification,...)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Read formatted data from a UFILE. <a href="#a18444caddf68d1d161fa13b2edd1a9c5"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a3da72684541aecfe6c16a79b2fed8e79">u_vfscanf</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f, const char *patternSpecification, va_list ap)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Read formatted data from a UFILE. <a href="#a3da72684541aecfe6c16a79b2fed8e79"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#ad8fd4a3cd5b363c78773b1d5f06e712e">u_fscanf_u</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *patternSpecification,...)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Read formatted data from a UFILE. <a href="#ad8fd4a3cd5b363c78773b1d5f06e712e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a9eeec18b5b99b4efb40887db70103e23">u_vfscanf_u</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *patternSpecification, va_list ap)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Read formatted data from a UFILE. <a href="#a9eeec18b5b99b4efb40887db70103e23"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a156e78f4160c0cde264158ab4f4f0081">u_fgets</a> (<a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *s, int32_t n, <a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Read one line of text into a UChar* string from a UFILE. <a href="#a156e78f4160c0cde264158ab4f4f0081"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#afbed21b23ad994d4c4f83e4fe3e8a890">u_fgetc</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Read a UChar from a UFILE. <a href="#afbed21b23ad994d4c4f83e4fe3e8a890"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a48b9be06c611643848639fa4c22a16f4">u_fgetcx</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Read a UChar32 from a UFILE. <a href="#a48b9be06c611643848639fa4c22a16f4"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a65dcbb420a8f44e88b88df9004b0872d">u_fungetc</a> (<a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> c, <a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Unget a UChar from a UFILE. <a href="#a65dcbb420a8f44e88b88df9004b0872d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a9a30c366593b86dd8244fee5a1d51c0a">u_file_read</a> (<a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *chars, int32_t count, <a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Read Unicode from a UFILE. <a href="#a9a30c366593b86dd8244fee5a1d51c0a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="utrans_8h.html#a1230b61c2370123b3f17d88dcdc13154">UTransliterator</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a155ccb79caa68fe03963576a27fcd3c7">u_fsettransliterator</a> (<a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> *file, <a class="el" href="ustdio_8h.html#a9e9aaa695e1c052127aae9a75f082155">UFileDirection</a> direction, <a class="el" href="utrans_8h.html#a1230b61c2370123b3f17d88dcdc13154">UTransliterator</a> *adopt, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set a transliterator on the UFILE. <a href="#a155ccb79caa68fe03963576a27fcd3c7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a762fa0be07b80294eb9b5eb42bf063d6">u_sprintf</a> (<a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *buffer, const char *patternSpecification,...)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write formatted data to a Unicode string. <a href="#a762fa0be07b80294eb9b5eb42bf063d6"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a778fe8a31eb14115b81dd61d22e4a462">u_snprintf</a> (<a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *buffer, int32_t count, const char *patternSpecification,...)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write formatted data to a Unicode string. <a href="#a778fe8a31eb14115b81dd61d22e4a462"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a7f33b7a3c43e29759e26db2a36e9798c">u_vsprintf</a> (<a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *buffer, const char *patternSpecification, va_list ap)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write formatted data to a Unicode string. <a href="#a7f33b7a3c43e29759e26db2a36e9798c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#aae7e44a6233404268c4ed2eebd661140">u_vsnprintf</a> (<a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *buffer, int32_t count, const char *patternSpecification, va_list ap)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write formatted data to a Unicode string. <a href="#aae7e44a6233404268c4ed2eebd661140"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a447b7713a97152de6b1e7ec609616343">u_sprintf_u</a> (<a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *buffer, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *patternSpecification,...)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write formatted data to a Unicode string. <a href="#a447b7713a97152de6b1e7ec609616343"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a4fd62d6127dba051060ec52b72a666cb">u_snprintf_u</a> (<a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *buffer, int32_t count, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *patternSpecification,...)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write formatted data to a Unicode string. <a href="#a4fd62d6127dba051060ec52b72a666cb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#aa8d03f1123ca9b69f385b83da027fee9">u_vsprintf_u</a> (<a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *buffer, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *patternSpecification, va_list ap)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write formatted data to a Unicode string. <a href="#aa8d03f1123ca9b69f385b83da027fee9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a2326d587dca4871d238a0d64e05ea7a4">u_vsnprintf_u</a> (<a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *buffer, int32_t count, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *patternSpecification, va_list ap)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Write formatted data to a Unicode string. <a href="#a2326d587dca4871d238a0d64e05ea7a4"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a601b0c316dedaaaeb085d75b46d65b94">u_sscanf</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *buffer, const char *patternSpecification,...)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Read formatted data from a Unicode string. <a href="#a601b0c316dedaaaeb085d75b46d65b94"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a60af3fad0a0d8af5cb32dd0947a231b4">u_vsscanf</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *buffer, const char *patternSpecification, va_list ap)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Read formatted data from a Unicode string. <a href="#a60af3fad0a0d8af5cb32dd0947a231b4"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#aa12f4423de68758e0363c877753a8091">u_sscanf_u</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *buffer, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *patternSpecification,...)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Read formatted data from a Unicode string. <a href="#aa12f4423de68758e0363c877753a8091"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="ustdio_8h.html#a0f79754941078285383dfc74602edf43">u_vsscanf_u</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *buffer, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *patternSpecification, va_list ap)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Read formatted data from a Unicode string. <a href="#a0f79754941078285383dfc74602edf43"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>C API: Unicode stdio-like API. </p> <h2>Unicode stdio-like C API</h2> <p>This API provides an stdio-like API wrapper around ICU's other formatting and parsing APIs. It is meant to ease the transition of adding Unicode support to a preexisting applications using stdio. The following is a small list of noticable differences between stdio and ICU I/O's ustdio implementation.</p> <ul> <li> <a class="el" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a> specific formatting and parsing is only done with file IO. </li> <li> u_fstropen can be used to simulate file IO with strings. This is similar to the iostream API, and it allows locale specific formatting and parsing to be used. </li> <li> This API provides uniform formatting and parsing behavior between platforms (unlike the standard stdio implementations found on various platforms). </li> <li> This API is better suited for text data handling than binary data handling when compared to the typical stdio implementation. </li> <li> You can specify a <a class="el" href="classTransliterator.html" title="Transliterator is an abstract class that transliterates text from one format to another...">Transliterator</a> while using the file IO. </li> <li> You can specify a file's codepage separately from the default system codepage. </li> </ul> <h2>Formatting and Parsing Specification</h2> <p>General printf format:<br/> %[format modifier][width][.precision][type modifier][format]</p> <p>General scanf format:<br/> %[*][format modifier][width][type modifier][format]</p> <table cellspacing="3"> <tr> <td>format</td><td>default<br/> printf<br/> type</td><td>default<br/> scanf<br/> type</td><td>description </td></tr> <tr> <td>E</td><td>double</td><td>float</td><td>Scientific with an uppercase exponent </td></tr> <tr> <td>e</td><td>double</td><td>float</td><td>Scientific with a lowercase exponent </td></tr> <tr> <td>G</td><td>double</td><td>float</td><td>Use E or f for best format </td></tr> <tr> <td>g</td><td>double</td><td>float</td><td>Use e or f for best format </td></tr> <tr> <td>f</td><td>double</td><td>float</td><td>Simple floating point without the exponent </td></tr> <tr> <td>X</td><td>int32_t</td><td>int32_t</td><td>ustdio special uppercase hex radix formatting </td></tr> <tr> <td>x</td><td>int32_t</td><td>int32_t</td><td>ustdio special lowercase hex radix formatting </td></tr> <tr> <td>d</td><td>int32_t</td><td>int32_t</td><td>Decimal format </td></tr> <tr> <td>i</td><td>int32_t</td><td>int32_t</td><td>Same as d </td></tr> <tr> <td>n</td><td>int32_t</td><td>int32_t</td><td>count (write the number of UTF-16 codeunits read/written) </td></tr> <tr> <td>o</td><td>int32_t</td><td>int32_t</td><td>ustdio special octal radix formatting </td></tr> <tr> <td>u</td><td>uint32_t</td><td>uint32_t</td><td>Decimal format </td></tr> <tr> <td>p</td><td>void *</td><td>void *</td><td>Prints the pointer value </td></tr> <tr> <td>s</td><td>char *</td><td>char *</td><td>Use default converter or specified converter from fopen </td></tr> <tr> <td>c</td><td>char</td><td>char</td><td>Use default converter or specified converter from fopen<br/> When width is specified for scanf, this acts like a non-NULL-terminated char * string.<br/> By default, only one char is written. </td></tr> <tr> <td>S</td><td>UChar *</td><td>UChar *</td><td>Null terminated UTF-16 string </td></tr> <tr> <td>C</td><td>UChar</td><td>UChar</td><td>16-bit Unicode code unit<br/> When width is specified for scanf, this acts like a non-NULL-terminated UChar * string<br/> By default, only one codepoint is written. </td></tr> <tr> <td>%[]</td><td> </td><td>UChar *</td><td>Null terminated UTF-16 string which contains the filtered set of characters specified by the <a class="el" href="classUnicodeSet.html" title="A mutable set of Unicode characters and multicharacter strings.">UnicodeSet</a> </td></tr> <tr> <td>%%</td><td> </td><td> </td><td>Show a percent sign </td></tr> </table> <p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> modifiers </p> <table class="doxtable"> <tr> <td>modifier</td><td>formats</td><td>type</td><td>comments </td></tr> <tr> <td>h</td><td>d, i, o, x</td><td>int16_t</td><td>short format </td></tr> <tr> <td>h</td><td>u</td><td>uint16_t</td><td>short format </td></tr> <tr> <td>h</td><td>c</td><td>char</td><td><b>(Unimplemented)</b> Use invariant converter </td></tr> <tr> <td>h</td><td>s</td><td>char *</td><td><b>(Unimplemented)</b> Use invariant converter </td></tr> <tr> <td>h</td><td>C</td><td>char</td><td><b>(Unimplemented)</b> 8-bit Unicode code unit </td></tr> <tr> <td>h</td><td>S</td><td>char *</td><td><b>(Unimplemented)</b> Null terminated UTF-8 string </td></tr> <tr> <td>l</td><td>d, i, o, x</td><td>int32_t</td><td>long format (no effect) </td></tr> <tr> <td>l</td><td>u</td><td>uint32_t</td><td>long format (no effect) </td></tr> <tr> <td>l</td><td>c</td><td>N/A</td><td><b>(Unimplemented)</b> Reserved for future implementation </td></tr> <tr> <td>l</td><td>s</td><td>N/A</td><td><b>(Unimplemented)</b> Reserved for future implementation </td></tr> <tr> <td>l</td><td>C</td><td>UChar32</td><td><b>(Unimplemented)</b> 32-bit Unicode code unit </td></tr> <tr> <td>l</td><td>S</td><td>UChar32 *</td><td><b>(Unimplemented)</b> Null terminated UTF-32 string </td></tr> <tr> <td>ll</td><td>d, i, o, x</td><td>int64_t</td><td>long long format </td></tr> <tr> <td>ll</td><td>u</td><td>uint64_t</td><td><b>(Unimplemented)</b> long long format </td></tr> <tr> <td>-</td><td><em>all</em></td><td>N/A</td><td>Left justify </td></tr> <tr> <td>+</td><td>d, i, o, x, e, f, g, E, G</td><td>N/A</td><td>Always show the plus or minus sign. Needs data for plus sign. </td></tr> <tr> <td>% </td><td>d, i, o, x, e, f, g, E, G</td><td>N/A</td><td>Instead of a "+" output a blank character for positive numbers. </td></tr> <tr> <td>%#</td><td>d, i, o, x, e, f, g, E, G</td><td>N/A</td><td>Precede octal value with 0, hex with 0x and show the decimal point for floats. </td></tr> <tr> <td>%<em>n</em></td><td><em>all</em></td><td>N/A</td><td>Width of input/output. num is an actual number from 0 to some large number. </td></tr> <tr> <td>%.<em>n</em></td><td>e, f, g, E, F, G</td><td>N/A</td><td>Significant digits precision. num is an actual number from 0 to some large number.<br/> If * is used in printf, then the precision is passed in as an argument before the number to be formatted. </td></tr> </table> <p>printf modifier * int32_t Next argument after this one specifies the width</p> <p>scanf modifier * N/A This field is scanned, but not stored</p> <p>If you are using this C API instead of the <a class="el" href="ustream_8h.html" title="C++ API: Unicode iostream like API.">ustream.h</a> API for C++, you can use one of the following u_fprintf examples to display a <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>.</p> <pre><code> UFILE *out = u_finit(stdout, NULL, NULL); <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> string1("string 1"); <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> string2("string 2"); u_fprintf(out, "%S\n", string1.getTerminatedBuffer()); u_fprintf(out, "%.*S\n", string2.length(), string2.getBuffer()); u_fclose(out); </code></pre> <p>Definition in file <a class="el" href="ustdio_8h_source.html">ustdio.h</a>.</p> <hr/><h2>Define Documentation</h2> <a class="anchor" id="ad2abb9cdcd84b75fef26348fd540e7c9"></a><!-- doxytag: member="ustdio.h::U_EOF" ref="ad2abb9cdcd84b75fef26348fd540e7c9" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define U_EOF 0xFFFF</td> </tr> </table> </div> <div class="memdoc"> <p>When an end of file is encountered, this value can be returned. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#afbed21b23ad994d4c4f83e4fe3e8a890" title="Read a UChar from a UFILE.">u_fgetc</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003963">Stable:</a></b></dt><dd>3.0 </dd></dl> <p>Definition at line <a class="el" href="ustdio_8h_source.html#l00204">204</a> of file <a class="el" href="ustdio_8h_source.html">ustdio.h</a>.</p> </div> </div> <hr/><h2>Typedef Documentation</h2> <a class="anchor" id="ae90a658afbabf4e36c17dd4eeb95f1a6"></a><!-- doxytag: member="ustdio.h::UFILE" ref="ae90a658afbabf4e36c17dd4eeb95f1a6" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef struct <a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> <a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a></td> </tr> </table> </div> <div class="memdoc"> <p>Forward declaration of a Unicode-aware file. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003964">Stable:</a></b></dt><dd>3.0 </dd></dl> <p>Definition at line <a class="el" href="ustdio_8h_source.html#l00207">207</a> of file <a class="el" href="ustdio_8h_source.html">ustdio.h</a>.</p> </div> </div> <hr/><h2>Enumeration Type Documentation</h2> <a class="anchor" id="a9e9aaa695e1c052127aae9a75f082155"></a><!-- doxytag: member="ustdio.h::UFileDirection" ref="a9e9aaa695e1c052127aae9a75f082155" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">enum <a class="el" href="ustdio_8h.html#a9e9aaa695e1c052127aae9a75f082155">UFileDirection</a></td> </tr> </table> </div> <div class="memdoc"> <p>Enum for which direction of stream a transliterator applies to. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#a155ccb79caa68fe03963576a27fcd3c7" title="Set a transliterator on the UFILE.">u_fsettransliterator</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003965">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> <p>Definition at line <a class="el" href="ustdio_8h_source.html#l00214">214</a> of file <a class="el" href="ustdio_8h_source.html">ustdio.h</a>.</p> </div> </div> <hr/><h2>Function Documentation</h2> <a class="anchor" id="ae87c57f37b30b724d24e003ced290370"></a><!-- doxytag: member="ustdio.h::u_fadopt" ref="ae87c57f37b30b724d24e003ced290370" args="(FILE *f, const char *locale, const char *codepage)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a>* u_fadopt </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"> <em>f</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>locale</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>codepage</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Open a UFILE on top of an existing FILE* stream. </p> <p>The FILE* stream ownership is transferred to the new UFILE. It will be closed when the UFILE is closed. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The FILE* which this UFILE will take ownership of. </td></tr> <tr><td valign="top"></td><td valign="top"><em>locale</em> </td><td>The locale whose conventions will be used to format and parse output. If this parameter is NULL, the default locale will be used. </td></tr> <tr><td valign="top"></td><td valign="top"><em>codepage</em> </td><td>The codepage in which data will be written to and read from the file. If this paramter is NULL, data will be written and read using the default codepage for <code>locale</code>, unless <code>locale</code> is NULL, in which case the system default codepage will be used. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A new UFILE, or NULL if an error occurred. If an error occurs the ownership of the FILE* stream remains with the caller. </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000247">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.4 </dd></dl> </div> </div> <a class="anchor" id="ab3241cbe6c98cc23a1a164b19d9f2d84"></a><!-- doxytag: member="ustdio.h::u_fclose" ref="ab3241cbe6c98cc23a1a164b19d9f2d84" args="(UFILE *file)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void u_fclose </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>file</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Close a UFILE. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>The UFILE to close. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003969">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="aebc8584d59bee9aa7a1d44391fb329e4"></a><!-- doxytag: member="ustdio.h::u_feof" ref="aebc8584d59bee9aa7a1d44391fb329e4" args="(UFILE *f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> u_feof </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Tests if the UFILE is at the end of the file stream. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE from which to read. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>Returns TRUE after the first read operation that attempts to read past the end of the file. It returns FALSE if the current position is not end of file. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003970">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="ab80062155b58334f8f85e6b5b4e93521"></a><!-- doxytag: member="ustdio.h::u_fflush" ref="ab80062155b58334f8f85e6b5b4e93521" args="(UFILE *file)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void u_fflush </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>file</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Flush output of a UFILE. </p> <p>Implies a flush of converter/transliterator state. (That is, a logical break is made in the output stream - for example if a different type of output is desired.) The underlying OS level file is also flushed. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>The UFILE to flush. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003971">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="afbed21b23ad994d4c4f83e4fe3e8a890"></a><!-- doxytag: member="ustdio.h::u_fgetc" ref="afbed21b23ad994d4c4f83e4fe3e8a890" args="(UFILE *f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> u_fgetc </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Read a UChar from a UFILE. </p> <p>It is recommended that <code>u_fgetcx</code> used instead for proper parsing functions, but sometimes reading code units is needed instead of codepoints.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE from which to read. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The UChar value read, or U+FFFF if no character was available. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003991">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a877318646295602392de8a858953e8ff"></a><!-- doxytag: member="ustdio.h::u_fgetcodepage" ref="a877318646295602392de8a858953e8ff" args="(UFILE *file)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* u_fgetcodepage </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>file</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Get the codepage in which data is written to and read from the UFILE. </p> <p>This is the same codepage passed in the preceding call to <code>u_fsetcodepage</code> or <code>u_fopen</code>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>The UFILE to query. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The codepage in which data is written to and read from the UFILE, or NULL if an error occurred. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003976">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a1a03b63365f381fa3baf030d7dfc9392"></a><!-- doxytag: member="ustdio.h::u_fgetConverter" ref="a1a03b63365f381fa3baf030d7dfc9392" args="(UFILE *f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="ucnv__err_8h.html#a0c2dcfbf71ad577f5285869e1ceb26b1">UConverter</a>* u_fgetConverter </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Returns an alias to the converter being used for this file. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE to get the value from </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>alias to the converter </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003978">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a48b9be06c611643848639fa4c22a16f4"></a><!-- doxytag: member="ustdio.h::u_fgetcx" ref="a48b9be06c611643848639fa4c22a16f4" args="(UFILE *f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> u_fgetcx </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Read a UChar32 from a UFILE. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE from which to read. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The UChar32 value read, or U_EOF if no character was available, or U+FFFFFFFF if an ill-formed character was encountered. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustring_8h.html#a7aad56a2a6f7cbe3b2fb802a218d239b" title="Unescape a string of characters and write the resulting Unicode characters to the...">u_unescape()</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003992">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a254f86265efa9b9e8e9683aa5bccdb7c"></a><!-- doxytag: member="ustdio.h::u_fgetfile" ref="a254f86265efa9b9e8e9683aa5bccdb7c" args="(UFILE *f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">FILE* u_fgetfile </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Get the FILE* associated with a UFILE. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A FILE*, owned by the UFILE. The FILE <em>must not</em> be closed. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003973">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a708f57f3b9560e13e96d5af5753d8633"></a><!-- doxytag: member="ustdio.h::u_fgetlocale" ref="a708f57f3b9560e13e96d5af5753d8633" args="(UFILE *file)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* u_fgetlocale </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>file</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Get the locale whose conventions are used to format and parse output. </p> <p>This is the same locale passed in the preceding call to<code>u_fsetlocale</code> or <code>u_fopen</code>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>The UFILE to set. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The locale whose conventions are used to format and parse output. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003974">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a156e78f4160c0cde264158ab4f4f0081"></a><!-- doxytag: member="ustdio.h::u_fgets" ref="a156e78f4160c0cde264158ab4f4f0081" args="(UChar *s, int32_t n, UFILE *f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* u_fgets </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>n</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Read one line of text into a UChar* string from a UFILE. </p> <p>The newline at the end of the line is read into the string. The string is always null terminated </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE from which to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>n</em> </td><td>The maximum number of characters - 1 to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>s</em> </td><td>The UChar* to receive the read data. Characters will be stored successively in <code>s</code> until a newline or EOF is reached. A null character (U+0000) will be appended to <code>s</code>. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A pointer to <code>s</code>, or NULL if no characters were available. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003990">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a9a30c366593b86dd8244fee5a1d51c0a"></a><!-- doxytag: member="ustdio.h::u_file_read" ref="a9a30c366593b86dd8244fee5a1d51c0a" args="(UChar *chars, int32_t count, UFILE *f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_file_read </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>chars</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Read Unicode from a UFILE. </p> <p>Bytes will be converted from the UFILE's underlying codepage, with subsequent conversion to Unicode. The data will not be NULL terminated. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>chars</em> </td><td>A pointer to receive the Unicode data. </td></tr> <tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of Unicode characters to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE from which to read. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode characters read. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003994">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="abb0b2946239f10903e865d910091514b"></a><!-- doxytag: member="ustdio.h::u_file_write" ref="abb0b2946239f10903e865d910091514b" args="(const UChar *ustring, int32_t count, UFILE *f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_file_write </td> <td>(</td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>ustring</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write Unicode to a UFILE. </p> <p>The ustring passed in will be converted to the UFILE's underlying codepage before it is written. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>ustring</em> </td><td>A pointer to the Unicode data to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of Unicode characters to write </td></tr> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE to which to write. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode characters written. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#a2e58874c36723ec9d01555f194c2116d" title="Write a Unicode to a UFILE.">u_fputs</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003985">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a97b3a4c3639271188f378bf87e2c957d"></a><!-- doxytag: member="ustdio.h::u_finit" ref="a97b3a4c3639271188f378bf87e2c957d" args="(FILE *f, const char *locale, const char *codepage)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a>* u_finit </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"> <em>f</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>locale</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>codepage</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Open a UFILE on top of an existing FILE* stream. </p> <p>The FILE* stream ownership remains with the caller. To have the UFILE take over ownership and responsibility for the FILE* stream, use the function u_fadopt. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The FILE* to which this UFILE will attach and use. </td></tr> <tr><td valign="top"></td><td valign="top"><em>locale</em> </td><td>The locale whose conventions will be used to format and parse output. If this parameter is NULL, the default locale will be used. </td></tr> <tr><td valign="top"></td><td valign="top"><em>codepage</em> </td><td>The codepage in which data will be written to and read from the file. If this paramter is NULL, data will be written and read using the default codepage for <code>locale</code>, unless <code>locale</code> is NULL, in which case the system default codepage will be used. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A new UFILE, or NULL if an error occurred. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003967">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a921519fbcb17c3e3c020b2871afb8b23"></a><!-- doxytag: member="ustdio.h::u_fopen" ref="a921519fbcb17c3e3c020b2871afb8b23" args="(const char *filename, const char *perm, const char *locale, const char *codepage)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a>* u_fopen </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>filename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>perm</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>locale</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>codepage</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Open a UFILE. </p> <p>A UFILE is a wrapper around a FILE* that is locale and codepage aware. That is, data written to a UFILE will be formatted using the conventions specified by that UFILE's <a class="el" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a>; this data will be in the character set specified by that UFILE's codepage. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td>The name of the file to open. </td></tr> <tr><td valign="top"></td><td valign="top"><em>perm</em> </td><td>The read/write permission for the UFILE; one of "r", "w", "rw" </td></tr> <tr><td valign="top"></td><td valign="top"><em>locale</em> </td><td>The locale whose conventions will be used to format and parse output. If this parameter is NULL, the default locale will be used. </td></tr> <tr><td valign="top"></td><td valign="top"><em>codepage</em> </td><td>The codepage in which data will be written to and read from the file. If this paramter is NULL the system default codepage will be used. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A new UFILE, or NULL if an error occurred. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003966">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="aace6d50c4e497147fa383f36619b6691"></a><!-- doxytag: member="ustdio.h::u_fprintf" ref="aace6d50c4e497147fa383f36619b6691" args="(UFILE *f, const char *patternSpecification,...)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_fprintf </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"> <em>...</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write formatted data to a UFILE. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE to which to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_fprintf</code> will interpret the variable arguments received and format the data. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode characters written to <code>f</code>. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003979">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a391d37061930a7ad8c33df8d5432ce12"></a><!-- doxytag: member="ustdio.h::u_fprintf_u" ref="a391d37061930a7ad8c33df8d5432ce12" args="(UFILE *f, const UChar *patternSpecification,...)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_fprintf_u </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"> <em>...</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write formatted data to a UFILE. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE to which to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_fprintf</code> will interpret the variable arguments received and format the data. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode characters written to <code>f</code>. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003981">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a41f2cddc2702c115848b4fbdb48c3794"></a><!-- doxytag: member="ustdio.h::u_fputc" ref="a41f2cddc2702c115848b4fbdb48c3794" args="(UChar32 uc, UFILE *f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> u_fputc </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> </td> <td class="paramname"> <em>uc</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write a UChar to a UFILE. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>uc</em> </td><td>The UChar to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE to which to write. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The character written if successful, EOF otherwise. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003984">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a2e58874c36723ec9d01555f194c2116d"></a><!-- doxytag: member="ustdio.h::u_fputs" ref="a2e58874c36723ec9d01555f194c2116d" args="(const UChar *s, UFILE *f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_fputs </td> <td>(</td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write a Unicode to a UFILE. </p> <p>The null (U+0000) terminated UChar* <code>s</code> will be written to <code>f</code>, excluding the NULL terminator. A newline will be added to <code>f</code>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>s</em> </td><td>The UChar* to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE to which to write. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A non-negative number if successful, EOF otherwise. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#abb0b2946239f10903e865d910091514b" title="Write Unicode to a UFILE.">u_file_write</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003983">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="af58b8c15c4ef981e1b7cc45e39eb75b8"></a><!-- doxytag: member="ustdio.h::u_frewind" ref="af58b8c15c4ef981e1b7cc45e39eb75b8" args="(UFILE *file)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void u_frewind </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>file</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Rewind the file pointer to the beginning of the file. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>The UFILE to rewind. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003972">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a18444caddf68d1d161fa13b2edd1a9c5"></a><!-- doxytag: member="ustdio.h::u_fscanf" ref="a18444caddf68d1d161fa13b2edd1a9c5" args="(UFILE *f, const char *patternSpecification,...)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_fscanf </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"> <em>...</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Read formatted data from a UFILE. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE from which to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_fscanf</code> will interpret the variable arguments received and parse the data. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of items successfully converted and assigned, or EOF if an error occurred. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003986">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="ad8fd4a3cd5b363c78773b1d5f06e712e"></a><!-- doxytag: member="ustdio.h::u_fscanf_u" ref="ad8fd4a3cd5b363c78773b1d5f06e712e" args="(UFILE *f, const UChar *patternSpecification,...)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_fscanf_u </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"> <em>...</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Read formatted data from a UFILE. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE from which to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_fscanf</code> will interpret the variable arguments received and parse the data. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of items successfully converted and assigned, or EOF if an error occurred. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003988">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a7381b833b6835034008985da1fb9acc2"></a><!-- doxytag: member="ustdio.h::u_fsetcodepage" ref="a7381b833b6835034008985da1fb9acc2" args="(const char *codepage, UFILE *file)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_fsetcodepage </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>codepage</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>file</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the codepage in which data will be written to and read from the UFILE. </p> <p>All Unicode data written to the UFILE will be converted to this codepage before it is written to the underlying FILE*. It it generally a bad idea to mix codepages within a file. This should only be called right after opening the <code>UFile</code>, or after calling <code>u_frewind</code>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>codepage</em> </td><td>The codepage in which data will be written to and read from the file. For example <code>"latin-1"</code> or <code>"ibm-943"</code>. A value of NULL means the default codepage for the UFILE's current locale will be used. </td></tr> <tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>The UFILE to set. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>0 if successful, otherwise a negative number. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#af58b8c15c4ef981e1b7cc45e39eb75b8" title="Rewind the file pointer to the beginning of the file.">u_frewind</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003977">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="adb774e3149c9a0da75bda57a71098935"></a><!-- doxytag: member="ustdio.h::u_fsetlocale" ref="adb774e3149c9a0da75bda57a71098935" args="(UFILE *file, const char *locale)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_fsetlocale </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>file</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>locale</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Set the locale whose conventions will be used to format and parse output. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>locale</em> </td><td>The locale whose conventions will be used to format and parse output. </td></tr> <tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>The UFILE to query. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>NULL if successful, otherwise a negative number. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003975">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a155ccb79caa68fe03963576a27fcd3c7"></a><!-- doxytag: member="ustdio.h::u_fsettransliterator" ref="a155ccb79caa68fe03963576a27fcd3c7" args="(UFILE *file, UFileDirection direction, UTransliterator *adopt, UErrorCode *status)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="utrans_8h.html#a1230b61c2370123b3f17d88dcdc13154">UTransliterator</a>* u_fsettransliterator </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>file</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="ustdio_8h.html#a9e9aaa695e1c052127aae9a75f082155">UFileDirection</a> </td> <td class="paramname"> <em>direction</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utrans_8h.html#a1230b61c2370123b3f17d88dcdc13154">UTransliterator</a> * </td> <td class="paramname"> <em>adopt</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> * </td> <td class="paramname"> <em>status</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Set a transliterator on the UFILE. </p> <p>The transliterator will be owned by the UFILE. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>file</em> </td><td>The UFILE to set transliteration on </td></tr> <tr><td valign="top"></td><td valign="top"><em>adopt</em> </td><td>The UTransliterator to set. Can be NULL, which will mean that no transliteration is used. </td></tr> <tr><td valign="top"></td><td valign="top"><em>direction</em> </td><td>either U_READ, U_WRITE, or U_READWRITE - sets which direction the transliterator is to be applied to. If U_READWRITE, the "Read" transliteration will be in the inverse direction. </td></tr> <tr><td valign="top"></td><td valign="top"><em>status</em> </td><td>ICU error code. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The previously set transliterator, owned by the caller. If U_READWRITE is specified, only the WRITE transliterator is returned. In most cases, the caller should call <a class="el" href="utrans_8h.html#a148066969cc61b36a8cbcc76f7dd02f8" title="Close a transliterator.">utrans_close()</a> on the result of this function. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003995">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a8dbdc3a52164c1f207d7731105b85982"></a><!-- doxytag: member="ustdio.h::u_fstropen" ref="a8dbdc3a52164c1f207d7731105b85982" args="(UChar *stringBuf, int32_t capacity, const char *locale)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a>* u_fstropen </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>stringBuf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>capacity</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>locale</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Create a UFILE that can be used for localized formatting or parsing. </p> <p>The u_sprintf and u_sscanf functions do not read or write numbers for a specific locale. The <a class="el" href="ustdio_8h.html" title="C API: Unicode stdio-like API.">ustdio.h</a> file functions can be used on this UFILE. The string is usable once u_fclose or u_fflush has been called on the returned UFILE. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>stringBuf</em> </td><td>The string used for reading or writing. </td></tr> <tr><td valign="top"></td><td valign="top"><em>capacity</em> </td><td>The number of code units available for use in stringBuf </td></tr> <tr><td valign="top"></td><td valign="top"><em>locale</em> </td><td>The locale whose conventions will be used to format and parse output. If this parameter is NULL, the default locale will be used. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A new UFILE, or NULL if an error occurred. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003968">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a65dcbb420a8f44e88b88df9004b0872d"></a><!-- doxytag: member="ustdio.h::u_fungetc" ref="a65dcbb420a8f44e88b88df9004b0872d" args="(UChar32 c, UFILE *f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> u_fungetc </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> </td> <td class="paramname"> <em>c</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Unget a UChar from a UFILE. </p> <p>If this function is not the first to operate on <code>f</code> after a call to <code>u_fgetc</code>, the results are undefined. If this function is passed a character that was not recieved from the previous <code>u_fgetc</code> or <code>u_fgetcx</code> call, the results are undefined. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>The UChar to put back on the stream. </td></tr> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE to receive <code>c</code>. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The UChar32 value put back if successful, U_EOF otherwise. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003993">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a778fe8a31eb14115b81dd61d22e4a462"></a><!-- doxytag: member="ustdio.h::u_snprintf" ref="a778fe8a31eb14115b81dd61d22e4a462" args="(UChar *buffer, int32_t count, const char *patternSpecification,...)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_snprintf </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"> <em>...</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write formatted data to a Unicode string. </p> <p>When the number of code units required to store the data exceeds <code>count</code>, then <code>count</code> code units of data are stored in <code>buffer</code> and a negative value is returned. When the number of code units required to store the data equals <code>count</code>, the string is not null terminated and <code>count</code> is returned.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>The Unicode String to which to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of code units to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_sprintf</code> will interpret the variable arguments received and format the data. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode characters that would have been written to <code>buffer</code> had count been sufficiently large. This does not include the terminating null character. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003997">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a4fd62d6127dba051060ec52b72a666cb"></a><!-- doxytag: member="ustdio.h::u_snprintf_u" ref="a4fd62d6127dba051060ec52b72a666cb" args="(UChar *buffer, int32_t count, const UChar *patternSpecification,...)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_snprintf_u </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"> <em>...</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write formatted data to a Unicode string. </p> <p>When the number of code units required to store the data exceeds <code>count</code>, then <code>count</code> code units of data are stored in <code>buffer</code> and a negative value is returned. When the number of code units required to store the data equals <code>count</code>, the string is not null terminated and <code>count</code> is returned.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>The Unicode string to which to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of code units to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_sprintf</code> will interpret the variable arguments received and format the data. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode characters that would have been written to <code>buffer</code> had count been sufficiently large. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable004001">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a762fa0be07b80294eb9b5eb42bf063d6"></a><!-- doxytag: member="ustdio.h::u_sprintf" ref="a762fa0be07b80294eb9b5eb42bf063d6" args="(UChar *buffer, const char *patternSpecification,...)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_sprintf </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"> <em>...</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write formatted data to a Unicode string. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>The Unicode String to which to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_sprintf</code> will interpret the variable arguments received and format the data. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode code units written to <code>buffer</code>. This does not include the terminating null character. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003996">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a447b7713a97152de6b1e7ec609616343"></a><!-- doxytag: member="ustdio.h::u_sprintf_u" ref="a447b7713a97152de6b1e7ec609616343" args="(UChar *buffer, const UChar *patternSpecification,...)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_sprintf_u </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"> <em>...</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write formatted data to a Unicode string. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>The Unicode string to which to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_sprintf</code> will interpret the variable arguments received and format the data. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode characters written to <code>buffer</code>. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable004000">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a601b0c316dedaaaeb085d75b46d65b94"></a><!-- doxytag: member="ustdio.h::u_sscanf" ref="a601b0c316dedaaaeb085d75b46d65b94" args="(const UChar *buffer, const char *patternSpecification,...)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_sscanf </td> <td>(</td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"> <em>...</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Read formatted data from a Unicode string. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>The Unicode string from which to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_sscanf</code> will interpret the variable arguments received and parse the data. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of items successfully converted and assigned, or EOF if an error occurred. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable004004">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="aa12f4423de68758e0363c877753a8091"></a><!-- doxytag: member="ustdio.h::u_sscanf_u" ref="aa12f4423de68758e0363c877753a8091" args="(const UChar *buffer, const UChar *patternSpecification,...)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_sscanf_u </td> <td>(</td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"> </td> <td class="paramname"> <em>...</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Read formatted data from a Unicode string. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>The Unicode string from which to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_sscanf</code> will interpret the variable arguments received and parse the data. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of items successfully converted and assigned, or EOF if an error occurred. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable004006">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a8e3b9d93385a94595f3bdf8d5e992427"></a><!-- doxytag: member="ustdio.h::u_vfprintf" ref="a8e3b9d93385a94595f3bdf8d5e992427" args="(UFILE *f, const char *patternSpecification, va_list ap)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_vfprintf </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">va_list </td> <td class="paramname"> <em>ap</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write formatted data to a UFILE. </p> <p>This is identical to <code>u_fprintf</code>, except that it will <em>not</em> call <code>va_start</code> and <code>va_end</code>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE to which to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_fprintf</code> will interpret the variable arguments received and format the data. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ap</em> </td><td>The argument list to use. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode characters written to <code>f</code>. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#aace6d50c4e497147fa383f36619b6691" title="Write formatted data to a UFILE.">u_fprintf</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003980">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a67654b30a7ab9a23c61be373e35941f8"></a><!-- doxytag: member="ustdio.h::u_vfprintf_u" ref="a67654b30a7ab9a23c61be373e35941f8" args="(UFILE *f, const UChar *patternSpecification, va_list ap)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_vfprintf_u </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">va_list </td> <td class="paramname"> <em>ap</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write formatted data to a UFILE. </p> <p>This is identical to <code>u_fprintf_u</code>, except that it will <em>not</em> call <code>va_start</code> and <code>va_end</code>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE to which to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_fprintf</code> will interpret the variable arguments received and format the data. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ap</em> </td><td>The argument list to use. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode characters written to <code>f</code>. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#a391d37061930a7ad8c33df8d5432ce12" title="Write formatted data to a UFILE.">u_fprintf_u</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003982">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a3da72684541aecfe6c16a79b2fed8e79"></a><!-- doxytag: member="ustdio.h::u_vfscanf" ref="a3da72684541aecfe6c16a79b2fed8e79" args="(UFILE *f, const char *patternSpecification, va_list ap)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_vfscanf </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">va_list </td> <td class="paramname"> <em>ap</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Read formatted data from a UFILE. </p> <p>This is identical to <code>u_fscanf</code>, except that it will <em>not</em> call <code>va_start</code> and <code>va_end</code>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE from which to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_fscanf</code> will interpret the variable arguments received and parse the data. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ap</em> </td><td>The argument list to use. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of items successfully converted and assigned, or EOF if an error occurred. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#a18444caddf68d1d161fa13b2edd1a9c5" title="Read formatted data from a UFILE.">u_fscanf</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003987">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a9eeec18b5b99b4efb40887db70103e23"></a><!-- doxytag: member="ustdio.h::u_vfscanf_u" ref="a9eeec18b5b99b4efb40887db70103e23" args="(UFILE *f, const UChar *patternSpecification, va_list ap)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_vfscanf_u </td> <td>(</td> <td class="paramtype"><a class="el" href="ustdio_8h.html#ae90a658afbabf4e36c17dd4eeb95f1a6">UFILE</a> * </td> <td class="paramname"> <em>f</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">va_list </td> <td class="paramname"> <em>ap</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Read formatted data from a UFILE. </p> <p>This is identical to <code>u_fscanf_u</code>, except that it will <em>not</em> call <code>va_start</code> and <code>va_end</code>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>f</em> </td><td>The UFILE from which to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_fscanf</code> will interpret the variable arguments received and parse the data. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ap</em> </td><td>The argument list to use. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of items successfully converted and assigned, or EOF if an error occurred. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#ad8fd4a3cd5b363c78773b1d5f06e712e" title="Read formatted data from a UFILE.">u_fscanf_u</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003989">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="aae7e44a6233404268c4ed2eebd661140"></a><!-- doxytag: member="ustdio.h::u_vsnprintf" ref="aae7e44a6233404268c4ed2eebd661140" args="(UChar *buffer, int32_t count, const char *patternSpecification, va_list ap)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_vsnprintf </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">va_list </td> <td class="paramname"> <em>ap</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write formatted data to a Unicode string. </p> <p>This is identical to <code>u_snprintf</code>, except that it will <em>not</em> call <code>va_start</code> and <code>va_end</code>.<br/> <br/> When the number of code units required to store the data exceeds <code>count</code>, then <code>count</code> code units of data are stored in <code>buffer</code> and a negative value is returned. When the number of code units required to store the data equals <code>count</code>, the string is not null terminated and <code>count</code> is returned.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>The Unicode string to which to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of code units to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_sprintf</code> will interpret the variable arguments received and format the data. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ap</em> </td><td>The argument list to use. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode characters that would have been written to <code>buffer</code> had count been sufficiently large. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#a762fa0be07b80294eb9b5eb42bf063d6" title="Write formatted data to a Unicode string.">u_sprintf</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003999">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a2326d587dca4871d238a0d64e05ea7a4"></a><!-- doxytag: member="ustdio.h::u_vsnprintf_u" ref="a2326d587dca4871d238a0d64e05ea7a4" args="(UChar *buffer, int32_t count, const UChar *patternSpecification, va_list ap)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_vsnprintf_u </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"> <em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">va_list </td> <td class="paramname"> <em>ap</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write formatted data to a Unicode string. </p> <p>This is identical to <code>u_snprintf_u</code>, except that it will <em>not</em> call <code>va_start</code> and <code>va_end</code>. When the number of code units required to store the data exceeds <code>count</code>, then <code>count</code> code units of data are stored in <code>buffer</code> and a negative value is returned. When the number of code units required to store the data equals <code>count</code>, the string is not null terminated and <code>count</code> is returned.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>The Unicode string to which to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of code units to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_sprintf</code> will interpret the variable arguments received and format the data. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ap</em> </td><td>The argument list to use. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode characters that would have been written to <code>f</code> had count been sufficiently large. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#a447b7713a97152de6b1e7ec609616343" title="Write formatted data to a Unicode string.">u_sprintf_u</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable004003">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a7f33b7a3c43e29759e26db2a36e9798c"></a><!-- doxytag: member="ustdio.h::u_vsprintf" ref="a7f33b7a3c43e29759e26db2a36e9798c" args="(UChar *buffer, const char *patternSpecification, va_list ap)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_vsprintf </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">va_list </td> <td class="paramname"> <em>ap</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write formatted data to a Unicode string. </p> <p>This is identical to <code>u_sprintf</code>, except that it will <em>not</em> call <code>va_start</code> and <code>va_end</code>.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>The Unicode string to which to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_sprintf</code> will interpret the variable arguments received and format the data. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ap</em> </td><td>The argument list to use. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode characters written to <code>buffer</code>. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#a762fa0be07b80294eb9b5eb42bf063d6" title="Write formatted data to a Unicode string.">u_sprintf</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable003998">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="aa8d03f1123ca9b69f385b83da027fee9"></a><!-- doxytag: member="ustdio.h::u_vsprintf_u" ref="aa8d03f1123ca9b69f385b83da027fee9" args="(UChar *buffer, const UChar *patternSpecification, va_list ap)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_vsprintf_u </td> <td>(</td> <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">va_list </td> <td class="paramname"> <em>ap</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Write formatted data to a Unicode string. </p> <p>This is identical to <code>u_sprintf_u</code>, except that it will <em>not</em> call <code>va_start</code> and <code>va_end</code>.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>The Unicode string to which to write. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_sprintf</code> will interpret the variable arguments received and format the data. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ap</em> </td><td>The argument list to use. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of Unicode characters written to <code>f</code>. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#a447b7713a97152de6b1e7ec609616343" title="Write formatted data to a Unicode string.">u_sprintf_u</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable004002">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a60af3fad0a0d8af5cb32dd0947a231b4"></a><!-- doxytag: member="ustdio.h::u_vsscanf" ref="a60af3fad0a0d8af5cb32dd0947a231b4" args="(const UChar *buffer, const char *patternSpecification, va_list ap)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_vsscanf </td> <td>(</td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">va_list </td> <td class="paramname"> <em>ap</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Read formatted data from a Unicode string. </p> <p>This is identical to <code>u_sscanf</code>, except that it will <em>not</em> call <code>va_start</code> and <code>va_end</code>.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>The Unicode string from which to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_sscanf</code> will interpret the variable arguments received and parse the data. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ap</em> </td><td>The argument list to use. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of items successfully converted and assigned, or EOF if an error occurred. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#a601b0c316dedaaaeb085d75b46d65b94" title="Read formatted data from a Unicode string.">u_sscanf</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable004005">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> <a class="anchor" id="a0f79754941078285383dfc74602edf43"></a><!-- doxytag: member="ustdio.h::u_vsscanf_u" ref="a0f79754941078285383dfc74602edf43" args="(const UChar *buffer, const UChar *patternSpecification, va_list ap)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int32_t u_vsscanf_u </td> <td>(</td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>buffer</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"> <em>patternSpecification</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">va_list </td> <td class="paramname"> <em>ap</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Read formatted data from a Unicode string. </p> <p>This is identical to <code>u_sscanf_u</code>, except that it will <em>not</em> call <code>va_start</code> and <code>va_end</code>.</p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>The Unicode string from which to read. </td></tr> <tr><td valign="top"></td><td valign="top"><em>patternSpecification</em> </td><td>A pattern specifying how <code>u_sscanf</code> will interpret the variable arguments received and parse the data. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ap</em> </td><td>The argument list to use. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The number of items successfully converted and assigned, or EOF if an error occurred. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="ustdio_8h.html#aa12f4423de68758e0363c877753a8091" title="Read formatted data from a Unicode string.">u_sscanf_u</a> </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable004007">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div> </div> <!--- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Defines</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address> </body> </html>