| Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 Path : /opt/alt/alt-nodejs18/root/usr/share/doc/alt-nodejs18-libicu-doc/ |
| Current File : //opt/alt/alt-nodejs18/root/usr/share/doc/alt-nodejs18-libicu-doc/classFormattedValue.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ICU 74.2: icu::FormattedValue Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">ICU 74.2
 <span id="projectnumber">74.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceicu.html">icu</a></li><li class="navelem"><a class="el" href="classicu_1_1FormattedValue.html">FormattedValue</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">icu::FormattedValue Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>An abstract formatted value: a string with associated field attributes.
<a href="classicu_1_1FormattedValue.html#details">More...</a></p>
<p><code>#include <<a class="el" href="formattedvalue_8h_source.html">formattedvalue.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for icu::FormattedValue:</div>
<div class="dyncontent">
<div class="center">
<img src="classicu_1_1FormattedValue.png" usemap="#icu::FormattedValue_map" alt=""/>
<map id="icu::FormattedValue_map" name="icu::FormattedValue_map">
<area href="classicu_1_1FormattedDateInterval.html" title="An immutable class containing the result of a date interval formatting operation." alt="icu::FormattedDateInterval" shape="rect" coords="0,56,219,80"/>
<area href="classicu_1_1FormattedList.html" title="An immutable class containing the result of a list formatting operation." alt="icu::FormattedList" shape="rect" coords="229,56,448,80"/>
<area href="classicu_1_1FormattedRelativeDateTime.html" title="An immutable class containing the result of a relative datetime formatting operation." alt="icu::FormattedRelativeDateTime" shape="rect" coords="458,56,677,80"/>
<area href="classicu_1_1number_1_1FormattedNumber.html" title="The result of a number formatting operation." alt="icu::number::FormattedNumber" shape="rect" coords="687,56,906,80"/>
<area href="classicu_1_1number_1_1FormattedNumberRange.html" title="The result of a number range formatting operation." alt="icu::number::FormattedNumberRange" shape="rect" coords="916,56,1135,80"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:adb5a88697d2c271940ef68419f12cfea"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedValue.html#adb5a88697d2c271940ef68419f12cfea">~FormattedValue</a> ()</td></tr>
<tr class="separator:adb5a88697d2c271940ef68419f12cfea"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab65eae49614210cde61f68e0543993c3"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedValue.html#ab65eae49614210cde61f68e0543993c3">toString</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const =0</td></tr>
<tr class="memdesc:ab65eae49614210cde61f68e0543993c3"><td class="mdescLeft"> </td><td class="mdescRight">Returns the formatted string as a self-contained <a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a>. <a href="classicu_1_1FormattedValue.html#ab65eae49614210cde61f68e0543993c3">More...</a><br /></td></tr>
<tr class="separator:ab65eae49614210cde61f68e0543993c3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac79bc980f05406a36565e38268cc5470"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedValue.html#ac79bc980f05406a36565e38268cc5470">toTempString</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const =0</td></tr>
<tr class="memdesc:ac79bc980f05406a36565e38268cc5470"><td class="mdescLeft"> </td><td class="mdescRight">Returns the formatted string as a read-only alias to memory owned by the <a class="el" href="classicu_1_1FormattedValue.html" title="An abstract formatted value: a string with associated field attributes.">FormattedValue</a>. <a href="classicu_1_1FormattedValue.html#ac79bc980f05406a36565e38268cc5470">More...</a><br /></td></tr>
<tr class="separator:ac79bc980f05406a36565e38268cc5470"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adf0972bb328adad06a251136ad154471"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1Appendable.html">Appendable</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedValue.html#adf0972bb328adad06a251136ad154471">appendTo</a> (<a class="el" href="classicu_1_1Appendable.html">Appendable</a> &appendable, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const =0</td></tr>
<tr class="memdesc:adf0972bb328adad06a251136ad154471"><td class="mdescLeft"> </td><td class="mdescRight">Appends the formatted string to an <a class="el" href="classicu_1_1Appendable.html" title="Base class for objects to which Unicode characters and strings can be appended.">Appendable</a>. <a href="classicu_1_1FormattedValue.html#adf0972bb328adad06a251136ad154471">More...</a><br /></td></tr>
<tr class="separator:adf0972bb328adad06a251136ad154471"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3c15a47c141a9631c4db7b4bb0251395"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1FormattedValue.html#a3c15a47c141a9631c4db7b4bb0251395">nextPosition</a> (<a class="el" href="classicu_1_1ConstrainedFieldPosition.html">ConstrainedFieldPosition</a> &cfpos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const =0</td></tr>
<tr class="memdesc:a3c15a47c141a9631c4db7b4bb0251395"><td class="mdescLeft"> </td><td class="mdescRight">Iterates over field positions in the <a class="el" href="classicu_1_1FormattedValue.html" title="An abstract formatted value: a string with associated field attributes.">FormattedValue</a>. <a href="classicu_1_1FormattedValue.html#a3c15a47c141a9631c4db7b4bb0251395">More...</a><br /></td></tr>
<tr class="separator:a3c15a47c141a9631c4db7b4bb0251395"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An abstract formatted value: a string with associated field attributes. </p>
<p>Many formatters format to classes implementing <a class="el" href="classicu_1_1FormattedValue.html" title="An abstract formatted value: a string with associated field attributes.">FormattedValue</a>.</p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable004199">Stable:</a></b></dt><dd>ICU 64 </dd></dl>
<p class="definition">Definition at line <a class="el" href="formattedvalue_8h_source.html#l00241">241</a> of file <a class="el" href="formattedvalue_8h_source.html">formattedvalue.h</a>.</p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="adb5a88697d2c271940ef68419f12cfea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb5a88697d2c271940ef68419f12cfea">◆ </a></span>~FormattedValue()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual icu::FormattedValue::~FormattedValue </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable004213">Stable:</a></b></dt><dd>ICU 64 </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="adf0972bb328adad06a251136ad154471"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf0972bb328adad06a251136ad154471">◆ </a></span>appendTo()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classicu_1_1Appendable.html">Appendable</a>& icu::FormattedValue::appendTo </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classicu_1_1Appendable.html">Appendable</a> & </td>
<td class="paramname"><em>appendable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td>
<td class="paramname"><em>status</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Appends the formatted string to an <a class="el" href="classicu_1_1Appendable.html" title="Base class for objects to which Unicode characters and strings can be appended.">Appendable</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">appendable</td><td>The <a class="el" href="classicu_1_1Appendable.html" title="Base class for objects to which Unicode characters and strings can be appended.">Appendable</a> to which to append the string output. </td></tr>
<tr><td class="paramname">status</td><td>Set if an error occurs. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The same <a class="el" href="classicu_1_1Appendable.html" title="Base class for objects to which Unicode characters and strings can be appended.">Appendable</a>, for chaining.</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable004216">Stable:</a></b></dt><dd>ICU 64 </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classicu_1_1Appendable.html" title="Base class for objects to which Unicode characters and strings can be appended.">Appendable</a> </dd></dl>
<p>Implemented in <a class="el" href="classicu_1_1FormattedRelativeDateTime.html#a447b9789fff6c4dbe2d4024efff4a899">icu::FormattedRelativeDateTime</a>, <a class="el" href="classicu_1_1number_1_1FormattedNumberRange.html#a9d961c62ffa4a0f9b0d953ea6873e49a">icu::number::FormattedNumberRange</a>, <a class="el" href="classicu_1_1FormattedList.html#aafdce2a0a5ebfc725be118363aa2ea7a">icu::FormattedList</a>, <a class="el" href="classicu_1_1number_1_1FormattedNumber.html#ac726a1417f8fc5d7e209764a1b927b37">icu::number::FormattedNumber</a>, and <a class="el" href="classicu_1_1FormattedDateInterval.html#a646c13dff31213b0e16cebf0d0492434">icu::FormattedDateInterval</a>.</p>
</div>
</div>
<a id="a3c15a47c141a9631c4db7b4bb0251395"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c15a47c141a9631c4db7b4bb0251395">◆ </a></span>nextPosition()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> icu::FormattedValue::nextPosition </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classicu_1_1ConstrainedFieldPosition.html">ConstrainedFieldPosition</a> & </td>
<td class="paramname"><em>cfpos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td>
<td class="paramname"><em>status</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Iterates over field positions in the <a class="el" href="classicu_1_1FormattedValue.html" title="An abstract formatted value: a string with associated field attributes.">FormattedValue</a>. </p>
<p>This lets you determine the position of specific types of substrings, like a month or a decimal separator.</p>
<p>To loop over all field positions: </p><pre class="fragment">ConstrainedFieldPosition cfpos;
while (fmtval.nextPosition(cfpos, status)) {
// handle the field position; get information from cfpos
}
</pre> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">cfpos</td><td>The object used for iteration state. This can provide constraints to iterate over only one specific category or field; see <a class="el" href="classicu_1_1ConstrainedFieldPosition.html#a4813682fb0f5aca0438209a780831511" title="Sets a constraint on the field category.">ConstrainedFieldPosition::constrainCategory</a> and <a class="el" href="classicu_1_1ConstrainedFieldPosition.html#a36525bf694e70c4578e20309588a4847" title="Sets a constraint on the category and field.">ConstrainedFieldPosition::constrainField</a>. </td></tr>
<tr><td class="paramname">status</td><td>Set if an error occurs. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if a new occurrence of the field was found; false otherwise or if an error was set.</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable004217">Stable:</a></b></dt><dd>ICU 64 </dd></dl>
<p>Implemented in <a class="el" href="classicu_1_1FormattedRelativeDateTime.html#a7518e0a941b50a81e58b790a30111aa8">icu::FormattedRelativeDateTime</a>, <a class="el" href="classicu_1_1number_1_1FormattedNumberRange.html#a4c0c4a40b49420807735fc1948be7f9f">icu::number::FormattedNumberRange</a>, <a class="el" href="classicu_1_1FormattedList.html#a9124e99b56371b9e8c1171b1726f08c1">icu::FormattedList</a>, <a class="el" href="classicu_1_1number_1_1FormattedNumber.html#ad068e091b615d6f742b2834d0533bbd0">icu::number::FormattedNumber</a>, and <a class="el" href="classicu_1_1FormattedDateInterval.html#a66bd7e41781367d0c6280036cfc4fcbc">icu::FormattedDateInterval</a>.</p>
</div>
</div>
<a id="ab65eae49614210cde61f68e0543993c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab65eae49614210cde61f68e0543993c3">◆ </a></span>toString()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> icu::FormattedValue::toString </td>
<td>(</td>
<td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td>
<td class="paramname"><em>status</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the formatted string as a self-contained <a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a>. </p>
<p>If you need the string within the current scope only, consider <a class="el" href="classicu_1_1FormattedValue.html#ac79bc980f05406a36565e38268cc5470" title="Returns the formatted string as a read-only alias to memory owned by the FormattedValue.">toTempString</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">status</td><td>Set if an error occurs. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> containing the formatted string.</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable004214">Stable:</a></b></dt><dd>ICU 64 </dd></dl>
<p>Implemented in <a class="el" href="classicu_1_1FormattedRelativeDateTime.html#a6f3854bd31d30e1b4f9f076d3c1ff3d9">icu::FormattedRelativeDateTime</a>, <a class="el" href="classicu_1_1number_1_1FormattedNumberRange.html#a3e318ee6fc3de9e51d0bc7d7f42f8fe7">icu::number::FormattedNumberRange</a>, <a class="el" href="classicu_1_1FormattedList.html#a6436e030c9342f12d532f50cf5eed719">icu::FormattedList</a>, <a class="el" href="classicu_1_1number_1_1FormattedNumber.html#ab8395f20a931a042ada72ad6e2089ab7">icu::number::FormattedNumber</a>, and <a class="el" href="classicu_1_1FormattedDateInterval.html#a96eff2050d3ae24f25d67d401bb1ab5d">icu::FormattedDateInterval</a>.</p>
</div>
</div>
<a id="ac79bc980f05406a36565e38268cc5470"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac79bc980f05406a36565e38268cc5470">◆ </a></span>toTempString()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> icu::FormattedValue::toTempString </td>
<td>(</td>
<td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td>
<td class="paramname"><em>status</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the formatted string as a read-only alias to memory owned by the <a class="el" href="classicu_1_1FormattedValue.html" title="An abstract formatted value: a string with associated field attributes.">FormattedValue</a>. </p>
<p>The return value is valid only as long as this <a class="el" href="classicu_1_1FormattedValue.html" title="An abstract formatted value: a string with associated field attributes.">FormattedValue</a> is present and unchanged in memory. If you need the string outside the current scope, consider <a class="el" href="classicu_1_1FormattedValue.html#ab65eae49614210cde61f68e0543993c3" title="Returns the formatted string as a self-contained UnicodeString.">toString</a>.</p>
<p>The buffer returned by calling <a class="el" href="classicu_1_1UnicodeString.html#ae9ea82f86d91d9d978befb155cbec3cf" title="Get a read/write pointer to the internal buffer.">UnicodeString::getBuffer()</a> on the return value is guaranteed to be NUL-terminated.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">status</td><td>Set if an error occurs. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a temporary <a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> containing the formatted string.</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable004215">Stable:</a></b></dt><dd>ICU 64 </dd></dl>
<p>Implemented in <a class="el" href="classicu_1_1FormattedRelativeDateTime.html#a94e60343598726ab0a6967ead68b736d">icu::FormattedRelativeDateTime</a>, <a class="el" href="classicu_1_1number_1_1FormattedNumberRange.html#a22ae46a145dfaf162f9665aaea8037c3">icu::number::FormattedNumberRange</a>, <a class="el" href="classicu_1_1FormattedList.html#a5a3a743d5928bb0d61b2f5d9c3233867">icu::FormattedList</a>, <a class="el" href="classicu_1_1number_1_1FormattedNumber.html#adad7bdb8a7da95584e0c6507acb35670">icu::number::FormattedNumber</a>, and <a class="el" href="classicu_1_1FormattedDateInterval.html#a9d3de27818188b916756ccc9161e558a">icu::FormattedDateInterval</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>i18n/unicode/<a class="el" href="formattedvalue_8h_source.html">formattedvalue.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>