Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > f51238514e2abe817779ad2fe01b0759 > files > 733

icu-doc-4.4-2.1mdv2010.2.i586.rpm

<!-- 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: umsg.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.1 -->
<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&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;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&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>umsg.h File Reference</h1>
<p>C API: <a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a>.  
<a href="#_details">More...</a></p>
<code>#include &quot;<a class="el" href="utypes_8h_source.html">unicode/utypes.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="localpointer_8h_source.html">unicode/localpointer.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="uloc_8h_source.html">unicode/uloc.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="parseerr_8h_source.html">unicode/parseerr.h</a>&quot;</code><br/>
<code>#include &lt;stdarg.h&gt;</code><br/>

<p><a href="umsg_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>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The message format object.  <a href="#ab9e7346a57f2faed6df44a2e620e7553"></a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255">u_formatMessage</a> (const char *locale, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternLength, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *result, int32_t resultLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status,...)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a message for a locale.  <a href="#a4c02e1b7cff1ab8d463878e9aa1f0255"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a19d9729739a5e7064219a5102a2ec290">u_vformatMessage</a> (const char *locale, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternLength, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *result, int32_t resultLength, va_list ap, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a message for a locale.  <a href="#a19d9729739a5e7064219a5102a2ec290"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a954261c179cdbe9f7d84c272451d7fa7">u_parseMessage</a> (const char *locale, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternLength, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *source, int32_t sourceLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status,...)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parse a message.  <a href="#a954261c179cdbe9f7d84c272451d7fa7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#ae01d11a87fd5511e356f0adc0a97df23">u_vparseMessage</a> (const char *locale, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternLength, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *source, int32_t sourceLength, va_list ap, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parse a message.  <a href="#ae01d11a87fd5511e356f0adc0a97df23"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a689c0f8146908cb7bccc19bee19870af">u_formatMessageWithError</a> (const char *locale, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternLength, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *result, int32_t resultLength, <a class="el" href="structUParseError.html">UParseError</a> *parseError, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status,...)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a message for a locale.  <a href="#a689c0f8146908cb7bccc19bee19870af"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a2d928c7b1d49eeb42e66caf774a4e112">u_vformatMessageWithError</a> (const char *locale, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternLength, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *result, int32_t resultLength, <a class="el" href="structUParseError.html">UParseError</a> *parseError, va_list ap, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a message for a locale.  <a href="#a2d928c7b1d49eeb42e66caf774a4e112"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#ad88f13a12e31c0b7f55930f61be31979">u_parseMessageWithError</a> (const char *locale, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternLength, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *source, int32_t sourceLength, <a class="el" href="structUParseError.html">UParseError</a> *parseError, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status,...)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parse a message.  <a href="#ad88f13a12e31c0b7f55930f61be31979"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#af8560e57a59ffcdc0de91d6db3e26bae">u_vparseMessageWithError</a> (const char *locale, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternLength, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *source, int32_t sourceLength, va_list ap, <a class="el" href="structUParseError.html">UParseError</a> *parseError, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parse a message.  <a href="#af8560e57a59ffcdc0de91d6db3e26bae"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a14218f82563d8ed52c16b4b66e6c056b">umsg_open</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternLength, const char *locale, <a class="el" href="structUParseError.html">UParseError</a> *parseError, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open a message formatter with given pattern and for the given locale.  <a href="#a14218f82563d8ed52c16b4b66e6c056b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a6aa7c93af125cbbe3f9d5c321fdc593c">umsg_close</a> (<a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *format)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Close a UMessageFormat.  <a href="#a6aa7c93af125cbbe3f9d5c321fdc593c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a89952c4d05455359365fb82c45144c3f">umsg_clone</a> (const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *fmt, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Open a copy of a UMessageFormat.  <a href="#a89952c4d05455359365fb82c45144c3f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a85de2ac6bf6e40afe1a143bcc3ad389e">umsg_setLocale</a> (<a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *fmt, const char *locale)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the locale.  <a href="#a85de2ac6bf6e40afe1a143bcc3ad389e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a0281d43c54deb52e531c92915edba997">umsg_getLocale</a> (const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *fmt)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the locale.  <a href="#a0281d43c54deb52e531c92915edba997"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#ac3e6eb3b875750e179b86a646fb6626d">umsg_applyPattern</a> (<a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *fmt, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternLength, <a class="el" href="structUParseError.html">UParseError</a> *parseError, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the pattern.  <a href="#ac3e6eb3b875750e179b86a646fb6626d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#af7f1f88f2472c4e4e9c8c732e84ebd22">umsg_toPattern</a> (const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *fmt, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *result, int32_t resultLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the pattern.  <a href="#af7f1f88f2472c4e4e9c8c732e84ebd22"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a90a4b5fe778754e5da52f7c2e5fd6048">umsg_format</a> (const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *fmt, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *result, int32_t resultLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status,...)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a message for a locale.  <a href="#a90a4b5fe778754e5da52f7c2e5fd6048"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#ad3376e423041aa5b4c8595d6105c7999">umsg_vformat</a> (const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *fmt, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *result, int32_t resultLength, va_list ap, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a message for a locale.  <a href="#ad3376e423041aa5b4c8595d6105c7999"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a617f4fef1a5a85a8c1ffd5d21c3e777f">umsg_parse</a> (const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *fmt, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *source, int32_t sourceLength, int32_t *count, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status,...)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parse a message.  <a href="#a617f4fef1a5a85a8c1ffd5d21c3e777f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a58ed416cca890687dbe4477e57d1d403">umsg_vparse</a> (const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *fmt, const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *source, int32_t sourceLength, int32_t *count, va_list ap, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parse a message.  <a href="#a58ed416cca890687dbe4477e57d1d403"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="umsg_8h.html#a9da796210146ff51d395affe4928f0b7">umsg_autoQuoteApostrophe</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *pattern, int32_t patternLength, <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *dest, int32_t destCapacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *ec)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert an 'apostrophe-friendly' pattern into a standard pattern.  <a href="#a9da796210146ff51d395affe4928f0b7"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>C API: <a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a>. </p>
<h2>Message <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> C API </h2>
<p>Provides means to produce concatenated messages in language-neutral way. Use this for all concatenations that show up to end users. </p>
<p>Takes a set of objects, formats them, then inserts the formatted strings into the pattern at the appropriate places. </p>
<p>Here are some examples of usage: Example 1: </p>
<pre>
 <div class="fragment"><pre class="fragment">     <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> *result, *tzID, *str;
     <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> pattern[100];
     int32_t resultLengthOut, resultlength;
     <a class="code" href="ucal_8h.html#afb45437aa9182d9fdcd96a2119e1e144" title="A calendar.">UCalendar</a> *cal;
     <a class="code" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039" title="Date and Time data type.">UDate</a> d1;
     <a class="code" href="udat_8h.html#a27d96fa46db679d5b8583dff2e6c023f" title="A date formatter.">UDateFormat</a> *def1;
     <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9" title="No error, no warning.">U_ZERO_ERROR</a>;

     str=(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>*)malloc(<span class="keyword">sizeof</span>(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>) * (strlen(<span class="stringliteral">&quot;disturbance in force&quot;</span>) +1));
     <a class="code" href="ustring_8h.html#a0f2d5d46acef8e0eac711bef15e7531f" title="Copy a byte string encoded in the default codepage to a ustring.">u_uastrcpy</a>(str, <span class="stringliteral">&quot;disturbance in force&quot;</span>);
     tzID=(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>*)malloc(<span class="keyword">sizeof</span>(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>) * 4);
     <a class="code" href="ustring_8h.html#a0f2d5d46acef8e0eac711bef15e7531f" title="Copy a byte string encoded in the default codepage to a ustring.">u_uastrcpy</a>(tzID, <span class="stringliteral">&quot;PST&quot;</span>);
     cal=<a class="code" href="ucal_8h.html#ac9d3d4893f5b22a90edff24bedaf361c" title="Open a UCalendar.">ucal_open</a>(tzID, <a class="code" href="group__ustring__ustrlen.html#gac4d8a5581fc5bde71d62ebd0a7a84ec5" title="Determine the length of an array of UChar.">u_strlen</a>(tzID), <span class="stringliteral">&quot;en_US&quot;</span>, <a class="code" href="ucal_8h.html#a80db55a10d0808a9f9b61e105b9d32fbaf40f59ee818a37ecfa599e89eb0c334d" title="Despite the name, UCAL_TRADITIONAL designates the locale&amp;#39;s default calendar,...">UCAL_TRADITIONAL</a>, &amp;status);
     <a class="code" href="ucal_8h.html#a8810072e357d43f6d9d4a792ff0be93e" title="Set a UCalendar&amp;#39;s current date.">ucal_setDateTime</a>(cal, 1999, <a class="code" href="ucal_8h.html#af13a67d4d259962e1840471f3a8e6596af65658af9cb3b9b829ae218318d8c11b" title="March.">UCAL_MARCH</a>, 18, 0, 0, 0, &amp;status);
     d1=<a class="code" href="ucal_8h.html#a533d4cbb14bcea658867cc19dbf117e7" title="Get a UCalendar&amp;#39;s current time in millis.">ucal_getMillis</a>(cal, &amp;status);
     <a class="code" href="ustring_8h.html#a0f2d5d46acef8e0eac711bef15e7531f" title="Copy a byte string encoded in the default codepage to a ustring.">u_uastrcpy</a>(pattern, <span class="stringliteral">&quot;On {0, date, long}, there was a {1} on planet {2,number,integer}&quot;</span>);
     resultlength=0;
     resultLengthOut=<a class="code" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255" title="Format a message for a locale.">u_formatMessage</a>( <span class="stringliteral">&quot;en_US&quot;</span>, pattern, <a class="code" href="group__ustring__ustrlen.html#gac4d8a5581fc5bde71d62ebd0a7a84ec5" title="Determine the length of an array of UChar.">u_strlen</a>(pattern), <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4" title="Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.">NULL</a>, resultlength, &amp;status, d1, str, 7);
     <span class="keywordflow">if</span>(status==<a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78ca294424f5f497a3161ed08b63ac962135" title="A result would not fit in the supplied buffer.">U_BUFFER_OVERFLOW_ERROR</a>){
         status=<a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9" title="No error, no warning.">U_ZERO_ERROR</a>;
         resultlength=resultLengthOut+1;
         result=(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>*)realloc(result, <span class="keyword">sizeof</span>(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>) * resultlength);
         <a class="code" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255" title="Format a message for a locale.">u_formatMessage</a>( <span class="stringliteral">&quot;en_US&quot;</span>, pattern, <a class="code" href="group__ustring__ustrlen.html#gac4d8a5581fc5bde71d62ebd0a7a84ec5" title="Determine the length of an array of UChar.">u_strlen</a>(pattern), result, resultlength, &amp;status, d1, str, 7);
     }
     printf(<span class="stringliteral">&quot;%s\n&quot;</span>, austrdup(result) );<span class="comment">//austrdup( a function used to convert UChar* to char*)</span>
     <span class="comment">//output&gt;: &quot;On March 18, 1999, there was a disturbance in force on planet 7</span>
</pre></div>
 </pre><p> Typically, the message format will come from resources, and the arguments will be dynamically set at runtime. </p>
<p>Example 2: </p>
<pre>
 <div class="fragment"><pre class="fragment">     <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>* str;
     <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9" title="No error, no warning.">U_ZERO_ERROR</a>;
     <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> *result;
     <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> pattern[100];
     int32_t resultlength, resultLengthOut, i;
     <span class="keywordtype">double</span> testArgs= { 100.0, 1.0, 0.0};

     str=(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>*)malloc(<span class="keyword">sizeof</span>(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>) * 10);
     <a class="code" href="ustring_8h.html#a0f2d5d46acef8e0eac711bef15e7531f" title="Copy a byte string encoded in the default codepage to a ustring.">u_uastrcpy</a>(str, <span class="stringliteral">&quot;MyDisk&quot;</span>);
     <a class="code" href="ustring_8h.html#a0f2d5d46acef8e0eac711bef15e7531f" title="Copy a byte string encoded in the default codepage to a ustring.">u_uastrcpy</a>(pattern, <span class="stringliteral">&quot;The disk {1} contains {0,choice,0#no files|1#one file|1&lt;{0,number,integer} files}&quot;</span>);
     <span class="keywordflow">for</span>(i=0; i&lt;3; i++){
       resultlength=0; 
       resultLengthOut=<a class="code" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255" title="Format a message for a locale.">u_formatMessage</a>( <span class="stringliteral">&quot;en_US&quot;</span>, pattern, <a class="code" href="group__ustring__ustrlen.html#gac4d8a5581fc5bde71d62ebd0a7a84ec5" title="Determine the length of an array of UChar.">u_strlen</a>(pattern), <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4" title="Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.">NULL</a>, resultlength, &amp;status, testArgs[i], str); 
       <span class="keywordflow">if</span>(status==<a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78ca294424f5f497a3161ed08b63ac962135" title="A result would not fit in the supplied buffer.">U_BUFFER_OVERFLOW_ERROR</a>){
         status=<a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9" title="No error, no warning.">U_ZERO_ERROR</a>;
         resultlength=resultLengthOut+1;
         result=(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>*)malloc(<span class="keyword">sizeof</span>(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>) * resultlength);
         <a class="code" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255" title="Format a message for a locale.">u_formatMessage</a>( <span class="stringliteral">&quot;en_US&quot;</span>, pattern, <a class="code" href="group__ustring__ustrlen.html#gac4d8a5581fc5bde71d62ebd0a7a84ec5" title="Determine the length of an array of UChar.">u_strlen</a>(pattern), result, resultlength, &amp;status, testArgs[i], str);
       }
       printf(<span class="stringliteral">&quot;%s\n&quot;</span>, austrdup(result) );  <span class="comment">//austrdup( a function used to convert UChar* to char*)</span>
       free(result);
     }
     <span class="comment">// output, with different testArgs:</span>
     <span class="comment">// output: The disk &quot;MyDisk&quot; contains 100 files.</span>
     <span class="comment">// output: The disk &quot;MyDisk&quot; contains one file.</span>
     <span class="comment">// output: The disk &quot;MyDisk&quot; contains no files.</span>
</pre></div>
  </pre><p>Example 3: </p>
<pre>
 <div class="fragment"><pre class="fragment"> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>* str;
 <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>* str1;
 <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9" title="No error, no warning.">U_ZERO_ERROR</a>;
 <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> *result;
 <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> pattern[100];
 <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> expected[100];
 int32_t resultlength,resultLengthOut;

 str=(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>*)malloc(<span class="keyword">sizeof</span>(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>) * 25);
 <a class="code" href="ustring_8h.html#a0f2d5d46acef8e0eac711bef15e7531f" title="Copy a byte string encoded in the default codepage to a ustring.">u_uastrcpy</a>(str, <span class="stringliteral">&quot;Kirti&quot;</span>);
 str1=(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>*)malloc(<span class="keyword">sizeof</span>(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>) * 25);
 <a class="code" href="ustring_8h.html#a0f2d5d46acef8e0eac711bef15e7531f" title="Copy a byte string encoded in the default codepage to a ustring.">u_uastrcpy</a>(str1, <span class="stringliteral">&quot;female&quot;</span>);
 log_verbose(<span class="stringliteral">&quot;Testing message format with Select test #1\n:&quot;</span>);
 <a class="code" href="ustring_8h.html#a0f2d5d46acef8e0eac711bef15e7531f" title="Copy a byte string encoded in the default codepage to a ustring.">u_uastrcpy</a>(pattern, <span class="stringliteral">&quot;{0} est {1, select, female {all\\u00E9e} other {all\\u00E9}} \\u00E0 Paris.&quot;</span>);
 <a class="code" href="ustring_8h.html#a0f2d5d46acef8e0eac711bef15e7531f" title="Copy a byte string encoded in the default codepage to a ustring.">u_uastrcpy</a>(expected, <span class="stringliteral">&quot;Kirti est all\\u00E9e \\u00E0 Paris.&quot;</span>);
 resultlength=0;
 resultLengthOut=<a class="code" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255" title="Format a message for a locale.">u_formatMessage</a>( <span class="stringliteral">&quot;fr&quot;</span>, pattern, <a class="code" href="group__ustring__ustrlen.html#gac4d8a5581fc5bde71d62ebd0a7a84ec5" title="Determine the length of an array of UChar.">u_strlen</a>(pattern), <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4" title="Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.">NULL</a>, resultlength, &amp;status, str , str1);
 <span class="keywordflow">if</span>(status==<a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78ca294424f5f497a3161ed08b63ac962135" title="A result would not fit in the supplied buffer.">U_BUFFER_OVERFLOW_ERROR</a>)
  {
      status=<a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9" title="No error, no warning.">U_ZERO_ERROR</a>;
      resultlength=resultLengthOut+1;
      result=(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>*)malloc(<span class="keyword">sizeof</span>(<a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>) * resultlength);
      <a class="code" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255" title="Format a message for a locale.">u_formatMessage</a>( <span class="stringliteral">&quot;fr&quot;</span>, pattern, <a class="code" href="group__ustring__ustrlen.html#gac4d8a5581fc5bde71d62ebd0a7a84ec5" title="Determine the length of an array of UChar.">u_strlen</a>(pattern), result, resultlength, &amp;status, str , str1);
      <span class="keywordflow">if</span>(<a class="code" href="ustring_8h.html#abdb8af67ab5198b9db020afa9c3114b3" title="Compare two Unicode strings for bitwise equality (code unit order).">u_strcmp</a>(result, expected)==0)
          log_verbose(<span class="stringliteral">&quot;PASS: MessagFormat successful on Select test#1\n&quot;</span>);
      <span class="keywordflow">else</span>{
          log_err(<span class="stringliteral">&quot;FAIL: Error in MessageFormat on Select test#1\n GOT %s EXPECTED %s\n&quot;</span>, austrdup(result),
          austrdup(expected) );
      }
      free(result);
 }
</pre></div>
  </pre><p>The pattern is of the following form. Legend: </p>
<pre>
 <div class="fragment"><pre class="fragment">       {optional item}
       (group that may be repeated)*
</pre></div>
  </pre><p> Do not confuse optional items with items inside quotes braces, such as this: "{". Quoted braces are literals. </p>
<pre>
 <div class="fragment"><pre class="fragment">       messageFormatPattern := string ( <span class="stringliteral">&quot;{&quot;</span> messageFormatElement <span class="stringliteral">&quot;}&quot;</span> <span class="keywordtype">string</span> )*

       messageFormatElement := argument { <span class="stringliteral">&quot;,&quot;</span> elementFormat }

       elementFormat := <span class="stringliteral">&quot;time&quot;</span> { <span class="stringliteral">&quot;,&quot;</span> datetimeStyle }
                      | <span class="stringliteral">&quot;date&quot;</span> { <span class="stringliteral">&quot;,&quot;</span> datetimeStyle }
                      | <span class="stringliteral">&quot;number&quot;</span> { <span class="stringliteral">&quot;,&quot;</span> numberStyle }
                      | <span class="stringliteral">&quot;choice&quot;</span> <span class="stringliteral">&quot;,&quot;</span> choiceStyle
                      | <span class="stringliteral">&quot;select&quot;</span> <span class="stringliteral">&quot;,&quot;</span> selectStyle

       datetimeStyle := <span class="stringliteral">&quot;short&quot;</span>
                      | <span class="stringliteral">&quot;medium&quot;</span>
                      | <span class="stringliteral">&quot;long&quot;</span>
                      | <span class="stringliteral">&quot;full&quot;</span>
                      | dateFormatPattern

       numberStyle :=   <span class="stringliteral">&quot;currency&quot;</span>
                      | <span class="stringliteral">&quot;percent&quot;</span>
                      | <span class="stringliteral">&quot;integer&quot;</span>
                      | numberFormatPattern

       choiceStyle :=   choiceFormatPattern

       selectStyle :=   selectFormatPattern
</pre></div>
 </pre><p> If there is no elementFormat, then the argument must be a string, which is substituted. If there is no dateTimeStyle or numberStyle, then the default format is used (e.g. NumberFormat.getInstance(), DateFormat.getDefaultTime() or DateFormat.getDefaultDate(). For a <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a>, the pattern must always be specified, since there is no default. </p>
<p>In strings, single quotes can be used to quote the "{" sign if necessary. A real single quote is represented by ''. Inside a messageFormatElement, quotes are [not] removed. For example, {1,number,$'#',##} will produce a number format with the pound-sign quoted, with a result such as: "$#31,45". </p>
<p>If a pattern is used, then unquoted braces in the pattern, if any, must match: that is, "ab {0} de" and "ab '}' de" are ok, but "ab
 {0'}' de" and "ab } de" are not. </p>
<dl>
<dt><b>Warning:</b></dt>
<dd>The rules for using quotes within message format patterns unfortunately have shown to be somewhat confusing. In particular, it isn't always obvious to localizers whether single quotes need to be doubled or not. Make sure to inform localizers about the rules, and tell them (for example, by using comments in resource bundle source files) which strings will be processed by <a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a>. Note that localizers may need to use single quotes in translated strings where the original version doesn't have them. <br/>
Note also that the simplest way to avoid the problem is to use the real apostrophe (single quote) character U+2019 (') for human-readable text, and to use the ASCII apostrophe (U+0027 ' ) only in program syntax, like quoting in <a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a>. See the annotations for U+0027 Apostrophe in The Unicode Standard. </dd>
</dl>
<p>The argument is a number from 0 to 9, which corresponds to the arguments presented in an array to be formatted. </p>
<p>It is ok to have unused arguments in the array. With missing arguments or arguments that are not of the right class for the specified format, a failing UErrorCode result is set. </p>
<p>[Note:] As we see above, the string produced by a choice <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> in <a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a> is treated specially; occurances of '{' are used to indicated subformats. </p>
<p>[Note:] Formats are numbered by order of variable in the string. This is [not] the same as the argument numbering! </p>
<pre>
 <div class="fragment"><pre class="fragment">    For example: with <span class="stringliteral">&quot;abc{2}def{3}ghi{0}...&quot;</span>,

    format0 affects the first variable {2}
    format1 affects the second variable {3}
    format2 affects the second variable {0}
</pre></div>
 </pre><p> and so on. </p>

<p>Definition in file <a class="el" href="umsg_8h_source.html">umsg.h</a>.</p>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ab9e7346a57f2faed6df44a2e620e7553"></a><!-- doxytag: member="umsg.h::UMessageFormat" ref="ab9e7346a57f2faed6df44a2e620e7553" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void* <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The message format object. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003732">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="umsg_8h_source.html#l00468">468</a> of file <a class="el" href="umsg_8h_source.html">umsg.h</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a4c02e1b7cff1ab8d463878e9aa1f0255"></a><!-- doxytag: member="umsg.h::u_formatMessage" ref="a4c02e1b7cff1ab8d463878e9aa1f0255" args="(const char *locale, const UChar *pattern, int32_t patternLength, UChar *result, int32_t resultLength, UErrorCode *status,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t u_formatMessage </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>patternLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>resultLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a message for a locale. </p>
<p>This function may perform re-ordering of the arguments depending on the locale. For all numeric arguments, double is assumed unless the type is explicitly integer. All choice format arguments must be of type double. </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>&nbsp;</td><td>The locale for which the message will be formatted </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>The pattern specifying the message's format </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>patternLength</em>&nbsp;</td><td>The length of pattern </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>A pointer to a buffer to receive the formatted message. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>resultLength</em>&nbsp;</td><td>The maximum size of result. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>A variable-length argument list containing the arguments specified in pattern. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The total buffer size needed; if greater than resultLength, the output was truncated. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="umsg_8h.html#a954261c179cdbe9f7d84c272451d7fa7" title="Parse a message.">u_parseMessage</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003724">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a689c0f8146908cb7bccc19bee19870af"></a><!-- doxytag: member="umsg.h::u_formatMessageWithError" ref="a689c0f8146908cb7bccc19bee19870af" args="(const char *locale, const UChar *pattern, int32_t patternLength, UChar *result, int32_t resultLength, UParseError *parseError, UErrorCode *status,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t u_formatMessageWithError </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>patternLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>resultLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> *&nbsp;</td>
          <td class="paramname"> <em>parseError</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a message for a locale. </p>
<p>This function may perform re-ordering of the arguments depending on the locale. For all numeric arguments, double is assumed unless the type is explicitly integer. All choice format arguments must be of type double. </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>&nbsp;</td><td>The locale for which the message will be formatted </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>The pattern specifying the message's format </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>patternLength</em>&nbsp;</td><td>The length of pattern </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>A pointer to a buffer to receive the formatted message. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>resultLength</em>&nbsp;</td><td>The maximum size of result. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>A variable-length argument list containing the arguments specified in pattern. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parseError</em>&nbsp;</td><td>A pointer to <a class="el" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a> to receive information about errors occurred during parsing. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The total buffer size needed; if greater than resultLength, the output was truncated. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="umsg_8h.html#a954261c179cdbe9f7d84c272451d7fa7" title="Parse a message.">u_parseMessage</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003728">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a954261c179cdbe9f7d84c272451d7fa7"></a><!-- doxytag: member="umsg.h::u_parseMessage" ref="a954261c179cdbe9f7d84c272451d7fa7" args="(const char *locale, const UChar *pattern, int32_t patternLength, const UChar *source, int32_t sourceLength, UErrorCode *status,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_parseMessage </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>patternLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>sourceLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parse a message. </p>
<p>For numeric arguments, this function will always use doubles. Integer types should not be passed. This function is not able to parse all output from <a class="el" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255">u_formatMessage</a>. </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>&nbsp;</td><td>The locale for which the message is formatted </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>The pattern specifying the message's format </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>patternLength</em>&nbsp;</td><td>The length of pattern </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>The text to parse. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sourceLength</em>&nbsp;</td><td>The length of source, or -1 if null-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>A variable-length argument list containing the arguments specified in pattern. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255" title="Format a message for a locale.">u_formatMessage</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003726">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ad88f13a12e31c0b7f55930f61be31979"></a><!-- doxytag: member="umsg.h::u_parseMessageWithError" ref="ad88f13a12e31c0b7f55930f61be31979" args="(const char *locale, const UChar *pattern, int32_t patternLength, const UChar *source, int32_t sourceLength, UParseError *parseError, UErrorCode *status,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_parseMessageWithError </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>patternLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>sourceLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> *&nbsp;</td>
          <td class="paramname"> <em>parseError</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parse a message. </p>
<p>For numeric arguments, this function will always use doubles. Integer types should not be passed. This function is not able to parse all output from <a class="el" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255">u_formatMessage</a>. </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>&nbsp;</td><td>The locale for which the message is formatted </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>The pattern specifying the message's format </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>patternLength</em>&nbsp;</td><td>The length of pattern </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>The text to parse. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sourceLength</em>&nbsp;</td><td>The length of source, or -1 if null-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parseError</em>&nbsp;</td><td>A pointer to <a class="el" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a> to receive information about errors occurred during parsing. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>A variable-length argument list containing the arguments specified in pattern. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255" title="Format a message for a locale.">u_formatMessage</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003730">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a19d9729739a5e7064219a5102a2ec290"></a><!-- doxytag: member="umsg.h::u_vformatMessage" ref="a19d9729739a5e7064219a5102a2ec290" args="(const char *locale, const UChar *pattern, int32_t patternLength, UChar *result, int32_t resultLength, va_list ap, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t u_vformatMessage </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>patternLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>resultLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&nbsp;</td>
          <td class="paramname"> <em>ap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a message for a locale. </p>
<p>This function may perform re-ordering of the arguments depending on the locale. For all numeric arguments, double is assumed unless the type is explicitly integer. All choice format arguments must be of type double. </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>&nbsp;</td><td>The locale for which the message will be formatted </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>The pattern specifying the message's format </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>patternLength</em>&nbsp;</td><td>The length of pattern </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>A pointer to a buffer to receive the formatted message. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>resultLength</em>&nbsp;</td><td>The maximum size of result. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ap</em>&nbsp;</td><td>A variable-length argument list containing the arguments specified </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors in pattern. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The total buffer size needed; if greater than resultLength, the output was truncated. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="umsg_8h.html#a954261c179cdbe9f7d84c272451d7fa7" title="Parse a message.">u_parseMessage</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003725">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a2d928c7b1d49eeb42e66caf774a4e112"></a><!-- doxytag: member="umsg.h::u_vformatMessageWithError" ref="a2d928c7b1d49eeb42e66caf774a4e112" args="(const char *locale, const UChar *pattern, int32_t patternLength, UChar *result, int32_t resultLength, UParseError *parseError, va_list ap, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t u_vformatMessageWithError </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>patternLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>resultLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> *&nbsp;</td>
          <td class="paramname"> <em>parseError</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&nbsp;</td>
          <td class="paramname"> <em>ap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a message for a locale. </p>
<p>This function may perform re-ordering of the arguments depending on the locale. For all numeric arguments, double is assumed unless the type is explicitly integer. All choice format arguments must be of type double. </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>&nbsp;</td><td>The locale for which the message will be formatted </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>The pattern specifying the message's format </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>patternLength</em>&nbsp;</td><td>The length of pattern </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>A pointer to a buffer to receive the formatted message. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>resultLength</em>&nbsp;</td><td>The maximum size of result. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parseError</em>&nbsp;</td><td>A pointer to <a class="el" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a> to receive information about errors occurred during parsing. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ap</em>&nbsp;</td><td>A variable-length argument list containing the arguments specified </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors in pattern. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The total buffer size needed; if greater than resultLength, the output was truncated. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003729">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ae01d11a87fd5511e356f0adc0a97df23"></a><!-- doxytag: member="umsg.h::u_vparseMessage" ref="ae01d11a87fd5511e356f0adc0a97df23" args="(const char *locale, const UChar *pattern, int32_t patternLength, const UChar *source, int32_t sourceLength, va_list ap, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_vparseMessage </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>patternLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>sourceLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&nbsp;</td>
          <td class="paramname"> <em>ap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parse a message. </p>
<p>For numeric arguments, this function will always use doubles. Integer types should not be passed. This function is not able to parse all output from <a class="el" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255">u_formatMessage</a>. </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>&nbsp;</td><td>The locale for which the message is formatted </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>The pattern specifying the message's format </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>patternLength</em>&nbsp;</td><td>The length of pattern </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>The text to parse. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sourceLength</em>&nbsp;</td><td>The length of source, or -1 if null-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ap</em>&nbsp;</td><td>A variable-length argument list containing the arguments </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors specified in pattern. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255" title="Format a message for a locale.">u_formatMessage</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003727">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="af8560e57a59ffcdc0de91d6db3e26bae"></a><!-- doxytag: member="umsg.h::u_vparseMessageWithError" ref="af8560e57a59ffcdc0de91d6db3e26bae" args="(const char *locale, const UChar *pattern, int32_t patternLength, const UChar *source, int32_t sourceLength, va_list ap, UParseError *parseError, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u_vparseMessageWithError </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>patternLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>sourceLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&nbsp;</td>
          <td class="paramname"> <em>ap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> *&nbsp;</td>
          <td class="paramname"> <em>parseError</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parse a message. </p>
<p>For numeric arguments, this function will always use doubles. Integer types should not be passed. This function is not able to parse all output from <a class="el" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255">u_formatMessage</a>. </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>&nbsp;</td><td>The locale for which the message is formatted </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>The pattern specifying the message's format </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>patternLength</em>&nbsp;</td><td>The length of pattern </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>The text to parse. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sourceLength</em>&nbsp;</td><td>The length of source, or -1 if null-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ap</em>&nbsp;</td><td>A variable-length argument list containing the arguments </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parseError</em>&nbsp;</td><td>A pointer to <a class="el" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a> to receive information about errors occurred during parsing. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors specified in pattern. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255" title="Format a message for a locale.">u_formatMessage</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003731">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ac3e6eb3b875750e179b86a646fb6626d"></a><!-- doxytag: member="umsg.h::umsg_applyPattern" ref="ac3e6eb3b875750e179b86a646fb6626d" args="(UMessageFormat *fmt, const UChar *pattern, int32_t patternLength, UParseError *parseError, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void umsg_applyPattern </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *&nbsp;</td>
          <td class="paramname"> <em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>patternLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> *&nbsp;</td>
          <td class="paramname"> <em>parseError</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the pattern. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>The formatter to use </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>The pattern to be applied. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>patternLength</em>&nbsp;</td><td>Length of the pattern to use </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parseError</em>&nbsp;</td><td>Struct to receive information on position of error if an error is encountered.Can be NULL. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param set to success/failure code on exit. If the pattern is invalid, this will be set to a failure result. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003738">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a9da796210146ff51d395affe4928f0b7"></a><!-- doxytag: member="umsg.h::umsg_autoQuoteApostrophe" ref="a9da796210146ff51d395affe4928f0b7" args="(const UChar *pattern, int32_t patternLength, UChar *dest, int32_t destCapacity, UErrorCode *ec)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t umsg_autoQuoteApostrophe </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>patternLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>destCapacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>ec</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Convert an 'apostrophe-friendly' pattern into a standard pattern. </p>
<p>Standard patterns treat all apostrophes as quotes, which is problematic in some languages, e.g. French, where apostrophe is commonly used. This utility assumes that only an unpaired apostrophe immediately before a brace is a true quote. Other unpaired apostrophes are paired, and the resulting standard pattern string is returned.</p>
<p><b>Note</b> it is not guaranteed that the returned pattern is indeed a valid pattern. The only effect is to convert between patterns having different quoting semantics.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>the 'apostrophe-friendly' patttern to convert </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>patternLength</em>&nbsp;</td><td>the length of pattern, or -1 if unknown and pattern is null-terminated </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>the buffer for the result, or NULL if preflight only </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>destCapacity</em>&nbsp;</td><td>the length of the buffer, or 0 if preflighting </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ec</em>&nbsp;</td><td>the error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the length of the resulting text, not including trailing null if buffer has room for the trailing null, it is provided, otherwise not </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003744">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a89952c4d05455359365fb82c45144c3f"></a><!-- doxytag: member="umsg.h::umsg_clone" ref="a89952c4d05455359365fb82c45144c3f" args="(const UMessageFormat *fmt, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> umsg_clone </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *&nbsp;</td>
          <td class="paramname"> <em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Open a copy of a UMessageFormat. </p>
<p>This function performs a deep copy. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>The formatter to copy </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pointer to a UDateFormat identical to fmt. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003735">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a6aa7c93af125cbbe3f9d5c321fdc593c"></a><!-- doxytag: member="umsg.h::umsg_close" ref="a6aa7c93af125cbbe3f9d5c321fdc593c" args="(UMessageFormat *format)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void umsg_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *&nbsp;</td>
          <td class="paramname"> <em>format</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Close a UMessageFormat. </p>
<p>Once closed, a UMessageFormat may no longer be used. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format</em>&nbsp;</td><td>The formatter to close. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003734">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a90a4b5fe778754e5da52f7c2e5fd6048"></a><!-- doxytag: member="umsg.h::umsg_format" ref="a90a4b5fe778754e5da52f7c2e5fd6048" args="(const UMessageFormat *fmt, UChar *result, int32_t resultLength, UErrorCode *status,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t umsg_format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *&nbsp;</td>
          <td class="paramname"> <em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>resultLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a message for a locale. </p>
<p>This function may perform re-ordering of the arguments depending on the locale. For all numeric arguments, double is assumed unless the type is explicitly integer. All choice format arguments must be of type double. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>The formatter to use </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>A pointer to a buffer to receive the formatted message. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>resultLength</em>&nbsp;</td><td>The maximum size of result. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>A variable-length argument list containing the arguments specified in pattern. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The total buffer size needed; if greater than resultLength, the output was truncated. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003740">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a0281d43c54deb52e531c92915edba997"></a><!-- doxytag: member="umsg.h::umsg_getLocale" ref="a0281d43c54deb52e531c92915edba997" args="(const UMessageFormat *fmt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* umsg_getLocale </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *&nbsp;</td>
          <td class="paramname"> <em>fmt</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the locale. </p>
<p>This locale is used for fetching default number or date format information. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>The formatter to querry </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the locale. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003737">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a14218f82563d8ed52c16b4b66e6c056b"></a><!-- doxytag: member="umsg.h::umsg_open" ref="a14218f82563d8ed52c16b4b66e6c056b" args="(const UChar *pattern, int32_t patternLength, const char *locale, UParseError *parseError, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a>* umsg_open </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>patternLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> *&nbsp;</td>
          <td class="paramname"> <em>parseError</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Open a message formatter with given pattern and for the given locale. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>A pattern specifying the format to use. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>patternLength</em>&nbsp;</td><td>Length of the pattern to use </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>The locale for which the messages are formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parseError</em>&nbsp;</td><td>A pointer to <a class="el" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a> struct to receive any errors occured during parsing. Can be NULL. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A pointer to a UMessageFormat to use for formatting messages, or 0 if an error occurred. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003733">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a617f4fef1a5a85a8c1ffd5d21c3e777f"></a><!-- doxytag: member="umsg.h::umsg_parse" ref="a617f4fef1a5a85a8c1ffd5d21c3e777f" args="(const UMessageFormat *fmt, const UChar *source, int32_t sourceLength, int32_t *count, UErrorCode *status,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void umsg_parse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *&nbsp;</td>
          <td class="paramname"> <em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>sourceLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parse a message. </p>
<p>For numeric arguments, this function will always use doubles. Integer types should not be passed. This function is not able to parse all output from <a class="el" href="umsg_8h.html#a90a4b5fe778754e5da52f7c2e5fd6048">umsg_format</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>The formatter to use </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>The text to parse. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sourceLength</em>&nbsp;</td><td>The length of source, or -1 if null-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>Output param to receive number of elements returned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>A variable-length argument list containing the arguments specified in pattern. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003742">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a85de2ac6bf6e40afe1a143bcc3ad389e"></a><!-- doxytag: member="umsg.h::umsg_setLocale" ref="a85de2ac6bf6e40afe1a143bcc3ad389e" args="(UMessageFormat *fmt, const char *locale)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void umsg_setLocale </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *&nbsp;</td>
          <td class="paramname"> <em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>locale</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the locale. </p>
<p>This locale is used for fetching default number or date format information. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>The formatter to set </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>The locale the formatter should use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003736">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="af7f1f88f2472c4e4e9c8c732e84ebd22"></a><!-- doxytag: member="umsg.h::umsg_toPattern" ref="af7f1f88f2472c4e4e9c8c732e84ebd22" args="(const UMessageFormat *fmt, UChar *result, int32_t resultLength, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t umsg_toPattern </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *&nbsp;</td>
          <td class="paramname"> <em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>resultLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the pattern. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>The formatter to use </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>A pointer to a buffer to receive the pattern. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>resultLength</em>&nbsp;</td><td>The maximum size of result. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param set to success/failure code on exit. If the pattern is invalid, this will be set to a failure result. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the pattern of the format </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003739">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ad3376e423041aa5b4c8595d6105c7999"></a><!-- doxytag: member="umsg.h::umsg_vformat" ref="ad3376e423041aa5b4c8595d6105c7999" args="(const UMessageFormat *fmt, UChar *result, int32_t resultLength, va_list ap, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t umsg_vformat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *&nbsp;</td>
          <td class="paramname"> <em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>resultLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&nbsp;</td>
          <td class="paramname"> <em>ap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a message for a locale. </p>
<p>This function may perform re-ordering of the arguments depending on the locale. For all numeric arguments, double is assumed unless the type is explicitly integer. All choice format arguments must be of type double. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>The formatter to use </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>A pointer to a buffer to receive the formatted message. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>resultLength</em>&nbsp;</td><td>The maximum size of result. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ap</em>&nbsp;</td><td>A variable-length argument list containing the arguments </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors specified in pattern. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The total buffer size needed; if greater than resultLength, the output was truncated. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003741">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a58ed416cca890687dbe4477e57d1d403"></a><!-- doxytag: member="umsg.h::umsg_vparse" ref="a58ed416cca890687dbe4477e57d1d403" args="(const UMessageFormat *fmt, const UChar *source, int32_t sourceLength, int32_t *count, va_list ap, UErrorCode *status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void umsg_vparse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="umsg_8h.html#ab9e7346a57f2faed6df44a2e620e7553">UMessageFormat</a> *&nbsp;</td>
          <td class="paramname"> <em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>sourceLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t *&nbsp;</td>
          <td class="paramname"> <em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&nbsp;</td>
          <td class="paramname"> <em>ap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Parse a message. </p>
<p>For numeric arguments, this function will always use doubles. Integer types should not be passed. This function is not able to parse all output from <a class="el" href="umsg_8h.html#a90a4b5fe778754e5da52f7c2e5fd6048">umsg_format</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>The formatter to use </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>The text to parse. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sourceLength</em>&nbsp;</td><td>The length of source, or -1 if null-terminated. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>Output param to receive number of elements returned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ap</em>&nbsp;</td><td>A variable-length argument list containing the arguments </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>A pointer to an UErrorCode to receive any errors specified in pattern. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="umsg_8h.html#a4c02e1b7cff1ab8d463878e9aa1f0255" title="Format a message for a locale.">u_formatMessage</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003743">Stable:</a></b></dt><dd>ICU 2.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">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</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 size="1"/><address style="text-align: right;"><small>Generated on 16 Mar 2010 for ICU 4.4 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>