Sophie

Sophie

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

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: Replaceable Class 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 class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><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="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Replaceable Class Reference</h1><!-- doxytag: class="Replaceable" --><!-- doxytag: inherits="UObject" -->
<p><code><a class="el" href="classReplaceable.html" title="Replaceable is an abstract base class representing a string of characters that supports...">Replaceable</a></code> is an abstract base class representing a string of characters that supports the replacement of a range of itself with a new string of characters.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="rep_8h_source.html">rep.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Replaceable:</div>
<div class="dynsection">
 <div class="center">
  <img src="classReplaceable.gif" usemap="#Replaceable_map" alt=""/>
  <map id="Replaceable_map" name="Replaceable_map">
<area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,91,80"/>
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,91,24"/>
<area href="classUnicodeString.html" alt="UnicodeString" shape="rect" coords="0,168,91,192"/>
</map>
 </div>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classReplaceable.html#a1235bdf1712cb754c9d591ed399af367">~Replaceable</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#a1235bdf1712cb754c9d591ed399af367"></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="classReplaceable.html#a81c2af838cfaf3c2a0d46b7fa727e8d0">length</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of 16-bit code units in the text.  <a href="#a81c2af838cfaf3c2a0d46b7fa727e8d0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classReplaceable.html#a78909dd61599c6f2d8af7a9d3bf5dd0f">charAt</a> (int32_t offset) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the 16-bit code unit at the given offset into the text.  <a href="#a78909dd61599c6f2d8af7a9d3bf5dd0f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classReplaceable.html#ac7e972cbbe070b5fb1d0f824d2badb2c">char32At</a> (int32_t offset) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the 32-bit code point at the given 16-bit offset into the text.  <a href="#ac7e972cbbe070b5fb1d0f824d2badb2c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classReplaceable.html#abdf76adaff91c3310a70ae4297734bf4">extractBetween</a> (int32_t start, int32_t limit, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;target) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copies characters in the range [<code>start</code>, <code>limit</code>) into the <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> <code>target</code>.  <a href="#abdf76adaff91c3310a70ae4297734bf4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classReplaceable.html#ae403fe2b8d99c4dd1081417d77ca1e99">handleReplaceBetween</a> (int32_t start, int32_t limit, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;text)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Replaces a substring of this object with the given text.  <a href="#ae403fe2b8d99c4dd1081417d77ca1e99"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classReplaceable.html#aa99cf49af5401c5bc89cd6894c67e2e8">copy</a> (int32_t start, int32_t limit, int32_t dest)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copies a substring of this object, retaining metadata.  <a href="#aa99cf49af5401c5bc89cd6894c67e2e8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classReplaceable.html#ad4ae052a7be93bb0a69a6a55ff45ca43">hasMetaData</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if this object contains metadata.  <a href="#ad4ae052a7be93bb0a69a6a55ff45ca43"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classReplaceable.html">Replaceable</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classReplaceable.html#a6e976bb4e1517d753fed1ea82539657b">clone</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clone this object, an instance of a subclass of <a class="el" href="classReplaceable.html" title="Replaceable is an abstract base class representing a string of characters that supports...">Replaceable</a>.  <a href="#a6e976bb4e1517d753fed1ea82539657b"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classReplaceable.html#af581ed7be8f00628474e3789e5af42cd">Replaceable</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor.  <a href="#af581ed7be8f00628474e3789e5af42cd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classReplaceable.html#aaa70d54cdfecf5e6a0a86566c8f75809">getLength</a> () const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual version of <a class="el" href="classReplaceable.html#a81c2af838cfaf3c2a0d46b7fa727e8d0" title="Returns the number of 16-bit code units in the text.">length()</a>.  <a href="#aaa70d54cdfecf5e6a0a86566c8f75809"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classReplaceable.html#a5cb36727170bbcc883a0c5846a6c4484">getCharAt</a> (int32_t offset) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual version of <a class="el" href="classReplaceable.html#a78909dd61599c6f2d8af7a9d3bf5dd0f" title="Returns the 16-bit code unit at the given offset into the text.">charAt()</a>.  <a href="#a5cb36727170bbcc883a0c5846a6c4484"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classReplaceable.html#a6305704f7ac09b06c85fd7698f7ac384">getChar32At</a> (int32_t offset) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Virtual version of <a class="el" href="classReplaceable.html#ac7e972cbbe070b5fb1d0f824d2badb2c" title="Returns the 32-bit code point at the given 16-bit offset into the text.">char32At()</a>.  <a href="#a6305704f7ac09b06c85fd7698f7ac384"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p><code><a class="el" href="classReplaceable.html" title="Replaceable is an abstract base class representing a string of characters that supports...">Replaceable</a></code> is an abstract base class representing a string of characters that supports the replacement of a range of itself with a new string of characters. </p>
<p>It is used by APIs that change a piece of text while retaining metadata. Metadata is data other than the Unicode characters returned by <a class="el" href="classReplaceable.html#ac7e972cbbe070b5fb1d0f824d2badb2c" title="Returns the 32-bit code point at the given 16-bit offset into the text.">char32At()</a>. One example of metadata is style attributes; another is an edit history, marking each character with an author and revision number.</p>
<p>An implicit aspect of the <code><a class="el" href="classReplaceable.html" title="Replaceable is an abstract base class representing a string of characters that supports...">Replaceable</a></code> API is that during a replace operation, new characters take on the metadata of the old characters. For example, if the string "the &lt;b&gt;bold&lt;/b&gt;
 font" has range (4, 8) replaced with "strong", then it becomes "the
 &lt;b&gt;strong&lt;/b&gt; font".</p>
<p><code><a class="el" href="classReplaceable.html" title="Replaceable is an abstract base class representing a string of characters that supports...">Replaceable</a></code> specifies ranges using a start offset and a limit offset. The range of characters thus specified includes the characters at offset start..limit-1. That is, the start offset is inclusive, and the limit offset is exclusive.</p>
<p><code><a class="el" href="classReplaceable.html" title="Replaceable is an abstract base class representing a string of characters that supports...">Replaceable</a></code> also includes API to access characters in the string: <code><a class="el" href="classReplaceable.html#a81c2af838cfaf3c2a0d46b7fa727e8d0" title="Returns the number of 16-bit code units in the text.">length()</a></code>, <code><a class="el" href="classReplaceable.html#a78909dd61599c6f2d8af7a9d3bf5dd0f" title="Returns the 16-bit code unit at the given offset into the text.">charAt()</a></code>, <code><a class="el" href="classReplaceable.html#ac7e972cbbe070b5fb1d0f824d2badb2c" title="Returns the 32-bit code point at the given 16-bit offset into the text.">char32At()</a></code>, and <code><a class="el" href="classReplaceable.html#abdf76adaff91c3310a70ae4297734bf4" title="Copies characters in the range [start, limit) into the UnicodeString target.">extractBetween()</a></code>.</p>
<p>For a subclass to support metadata, typical behavior of <code>replace()</code> is the following: </p>
<ul>
<li>
Set the metadata of the new text to the metadata of the first character replaced </li>
<li>
If no characters are replaced, use the metadata of the previous character </li>
<li>
If there is no previous character (i.e. start == 0), use the following character </li>
<li>
If there is no following character (i.e. the replaceable was empty), use default metadata.<br/>
 </li>
<li>
If the code point U+FFFF is seen, it should be interpreted as a special marker having no metadata</li>
<li>
</li>
</ul>
<p>If this is not the behavior, the subclass should document any differences. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>Alan Liu </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000291">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="rep_8h_source.html#l00071">71</a> of file <a class="el" href="rep_8h_source.html">rep.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a1235bdf1712cb754c9d591ed399af367"></a><!-- doxytag: member="Replaceable::~Replaceable" ref="a1235bdf1712cb754c9d591ed399af367" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual Replaceable::~Replaceable </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000292">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="af581ed7be8f00628474e3789e5af42cd"></a><!-- doxytag: member="Replaceable::Replaceable" ref="af581ed7be8f00628474e3789e5af42cd" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Replaceable::Replaceable </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default constructor. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000301">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac7e972cbbe070b5fb1d0f824d2badb2c"></a><!-- doxytag: member="Replaceable::char32At" ref="ac7e972cbbe070b5fb1d0f824d2badb2c" args="(int32_t offset) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> Replaceable::char32At </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>offset</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the 32-bit code point at the given 16-bit offset into the text. </p>
<p>This assumes the text is stored as 16-bit code units with surrogate pairs intermixed. If the offset of a leading or trailing code unit of a surrogate pair is given, return the code point of the surrogate pair.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>an integer between 0 and <code><a class="el" href="classReplaceable.html#a81c2af838cfaf3c2a0d46b7fa727e8d0" title="Returns the number of 16-bit code units in the text.">length()</a></code>-1 inclusive </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>32-bit code point of text at given offset </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000295">Stable:</a></b></dt><dd>ICU 1.8 </dd></dl>

<p>Reimplemented in <a class="el" href="classUnicodeString.html#a9ca80740ef5199cf1809c66a4ef6ba3d">UnicodeString</a>.</p>

<p>Definition at line <a class="el" href="rep_8h_source.html#l00251">251</a> of file <a class="el" href="rep_8h_source.html">rep.h</a>.</p>

<p>References <a class="el" href="classReplaceable.html#a6305704f7ac09b06c85fd7698f7ac384">getChar32At()</a>.</p>

</div>
</div>
<a class="anchor" id="a78909dd61599c6f2d8af7a9d3bf5dd0f"></a><!-- doxytag: member="Replaceable::charAt" ref="a78909dd61599c6f2d8af7a9d3bf5dd0f" args="(int32_t offset) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> Replaceable::charAt </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>offset</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the 16-bit code unit at the given offset into the text. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>an integer between 0 and <code><a class="el" href="classReplaceable.html#a81c2af838cfaf3c2a0d46b7fa727e8d0" title="Returns the number of 16-bit code units in the text.">length()</a></code>-1 inclusive </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>16-bit code unit of text at given offset </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000294">Stable:</a></b></dt><dd>ICU 1.8 </dd></dl>

<p>Reimplemented in <a class="el" href="classUnicodeString.html#ae3ffb6e15396dff152cb459ce4008f90">UnicodeString</a>.</p>

<p>Definition at line <a class="el" href="rep_8h_source.html#l00246">246</a> of file <a class="el" href="rep_8h_source.html">rep.h</a>.</p>

<p>References <a class="el" href="classReplaceable.html#a5cb36727170bbcc883a0c5846a6c4484">getCharAt()</a>.</p>

</div>
</div>
<a class="anchor" id="a6e976bb4e1517d753fed1ea82539657b"></a><!-- doxytag: member="Replaceable::clone" ref="a6e976bb4e1517d753fed1ea82539657b" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classReplaceable.html">Replaceable</a>* Replaceable::clone </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Clone this object, an instance of a subclass of <a class="el" href="classReplaceable.html" title="Replaceable is an abstract base class representing a string of characters that supports...">Replaceable</a>. </p>
<p>Clones can be used concurrently in multiple threads. If a subclass does not implement <a class="el" href="classReplaceable.html#a6e976bb4e1517d753fed1ea82539657b" title="Clone this object, an instance of a subclass of Replaceable.">clone()</a>, or if an error occurs, then NULL is returned. The clone functions in all subclasses return a pointer to a <a class="el" href="classReplaceable.html" title="Replaceable is an abstract base class representing a string of characters that supports...">Replaceable</a> because some compilers do not support covariant (same-as-this) return types; cast to the appropriate subclass if necessary. The caller must delete the clone.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>a clone of this object</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classUObject.html#a9b1acc95efd89cb86ec31f2dc947a262" title="ICU4C &quot;poor man&#39;s RTTI&quot;, returns a UClassID for the actual ICU class...">getDynamicClassID</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000300">Stable:</a></b></dt><dd>ICU 2.6 </dd></dl>

<p>Reimplemented in <a class="el" href="classUnicodeString.html#a6cf9e8332f251ddfb5758bcada18ea9e">UnicodeString</a>.</p>

</div>
</div>
<a class="anchor" id="aa99cf49af5401c5bc89cd6894c67e2e8"></a><!-- doxytag: member="Replaceable::copy" ref="aa99cf49af5401c5bc89cd6894c67e2e8" args="(int32_t start, int32_t limit, int32_t dest)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Replaceable::copy </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>limit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>dest</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copies a substring of this object, retaining metadata. </p>
<p>This method is used to duplicate or reorder substrings. The destination index must not overlap the source range.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>the beginning index, inclusive; <code>0 &lt;= start &lt;= limit</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>limit</em>&nbsp;</td><td>the ending index, exclusive; <code>start &lt;= limit &lt;= <a class="el" href="classReplaceable.html#a81c2af838cfaf3c2a0d46b7fa727e8d0" title="Returns the number of 16-bit code units in the text.">length()</a></code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>the destination index. The characters from <code>start..limit-1</code> will be copied to <code>dest</code>. Implementations of this method may assume that <code>dest &lt;= start || dest &gt;= limit</code>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000298">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classUnicodeString.html#a7a3e488399929c744e89a1e041988ec5">UnicodeString</a>.</p>

</div>
</div>
<a class="anchor" id="abdf76adaff91c3310a70ae4297734bf4"></a><!-- doxytag: member="Replaceable::extractBetween" ref="abdf76adaff91c3310a70ae4297734bf4" args="(int32_t start, int32_t limit, UnicodeString &amp;target) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Replaceable::extractBetween </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>limit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>target</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Copies characters in the range [<code>start</code>, <code>limit</code>) into the <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> <code>target</code>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>offset of first character which will be copied </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>limit</em>&nbsp;</td><td>offset immediately following the last character to be copied </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>target</em>&nbsp;</td><td><a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> into which to copy characters. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A reference to <code>target</code> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000296">Stable:</a></b></dt><dd>ICU 2.1 </dd></dl>

</div>
</div>
<a class="anchor" id="a6305704f7ac09b06c85fd7698f7ac384"></a><!-- doxytag: member="Replaceable::getChar32At" ref="a6305704f7ac09b06c85fd7698f7ac384" args="(int32_t offset) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809">UChar32</a> Replaceable::getChar32At </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>offset</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Virtual version of <a class="el" href="classReplaceable.html#ac7e972cbbe070b5fb1d0f824d2badb2c" title="Returns the 32-bit code point at the given 16-bit offset into the text.">char32At()</a>. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000304">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Implemented in <a class="el" href="classUnicodeString.html#a5b71c5fb6542921ad247f95c87dc00cf">UnicodeString</a>.</p>

<p>Referenced by <a class="el" href="rep_8h_source.html#l00251">char32At()</a>.</p>

</div>
</div>
<a class="anchor" id="a5cb36727170bbcc883a0c5846a6c4484"></a><!-- doxytag: member="Replaceable::getCharAt" ref="a5cb36727170bbcc883a0c5846a6c4484" args="(int32_t offset) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> Replaceable::getCharAt </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>offset</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Virtual version of <a class="el" href="classReplaceable.html#a78909dd61599c6f2d8af7a9d3bf5dd0f" title="Returns the 16-bit code unit at the given offset into the text.">charAt()</a>. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000303">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Implemented in <a class="el" href="classUnicodeString.html#a78317735bb5f7261750e90eeb39f1f40">UnicodeString</a>.</p>

<p>Referenced by <a class="el" href="rep_8h_source.html#l00246">charAt()</a>.</p>

</div>
</div>
<a class="anchor" id="aaa70d54cdfecf5e6a0a86566c8f75809"></a><!-- doxytag: member="Replaceable::getLength" ref="aaa70d54cdfecf5e6a0a86566c8f75809" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t Replaceable::getLength </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Virtual version of <a class="el" href="classReplaceable.html#a81c2af838cfaf3c2a0d46b7fa727e8d0" title="Returns the number of 16-bit code units in the text.">length()</a>. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000302">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Implemented in <a class="el" href="classUnicodeString.html#a362a1368137278f56f464aa0199a8117">UnicodeString</a>.</p>

<p>Referenced by <a class="el" href="rep_8h_source.html#l00241">length()</a>.</p>

</div>
</div>
<a class="anchor" id="ae403fe2b8d99c4dd1081417d77ca1e99"></a><!-- doxytag: member="Replaceable::handleReplaceBetween" ref="ae403fe2b8d99c4dd1081417d77ca1e99" args="(int32_t start, int32_t limit, const UnicodeString &amp;text)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Replaceable::handleReplaceBetween </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>start</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>limit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Replaces a substring of this object with the given text. </p>
<p>If the characters being replaced have metadata, the new characters that replace them should be given the same metadata.</p>
<p>Subclasses must ensure that if the text between start and limit is equal to the replacement text, that replace has no effect. That is, any metadata should be unaffected. In addition, subclasses are encouraged to check for initial and trailing identical characters, and make a smaller replacement if possible. This will preserve as much metadata as possible. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>the beginning index, inclusive; <code>0 &lt;= start &lt;= limit</code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>limit</em>&nbsp;</td><td>the ending index, exclusive; <code>start &lt;= limit &lt;= <a class="el" href="classReplaceable.html#a81c2af838cfaf3c2a0d46b7fa727e8d0" title="Returns the number of 16-bit code units in the text.">length()</a></code>. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>the text to replace characters <code>start</code> to <code>limit - 1</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000297">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ad4ae052a7be93bb0a69a6a55ff45ca43"></a><!-- doxytag: member="Replaceable::hasMetaData" ref="ad4ae052a7be93bb0a69a6a55ff45ca43" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> Replaceable::hasMetaData </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns true if this object contains metadata. </p>
<p>If a <a class="el" href="classReplaceable.html" title="Replaceable is an abstract base class representing a string of characters that supports...">Replaceable</a> object has metadata, calls to the <a class="el" href="classReplaceable.html" title="Replaceable is an abstract base class representing a string of characters that supports...">Replaceable</a> API must be made so as to preserve metadata. If it does not, calls to the <a class="el" href="classReplaceable.html" title="Replaceable is an abstract base class representing a string of characters that supports...">Replaceable</a> API may be optimized to improve performance. The default implementation returns true. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if this object contains metadata </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000299">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

<p>Reimplemented in <a class="el" href="classUnicodeString.html#ab06c04a1ff38184310bef13b859eb7c1">UnicodeString</a>.</p>

</div>
</div>
<a class="anchor" id="a81c2af838cfaf3c2a0d46b7fa727e8d0"></a><!-- doxytag: member="Replaceable::length" ref="a81c2af838cfaf3c2a0d46b7fa727e8d0" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t Replaceable::length </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the number of 16-bit code units in the text. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of 16-bit code units in text </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000293">Stable:</a></b></dt><dd>ICU 1.8 </dd></dl>

<p>Reimplemented in <a class="el" href="classUnicodeString.html#ac4cf80391a0e523c27aacaba796aede6">UnicodeString</a>.</p>

<p>Definition at line <a class="el" href="rep_8h_source.html#l00241">241</a> of file <a class="el" href="rep_8h_source.html">rep.h</a>.</p>

<p>References <a class="el" href="classReplaceable.html#aaa70d54cdfecf5e6a0a86566c8f75809">getLength()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="rep_8h_source.html">rep.h</a></li>
</ul>
</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>