Logo Search packages:      
Sourcecode: icu version File versions  Download package

UnicodeString & UnicodeString::fastCopyFrom ( const UnicodeString src  ) 

Almost the same as the assignment operator. Replace the characters in this UnicodeString with the characters from srcText.

This function works the same for all strings except for ones that are readonly aliases. Starting with ICU 2.4, the assignment operator and the copy constructor allocate a new buffer and copy the buffer contents even for readonly aliases. This function implements the old, more efficient but less safe behavior of making this string also a readonly alias to the same buffer. The fastCopyFrom function must be used only if it is known that the lifetime of this UnicodeString is at least as long as the lifetime of the aliased buffer including its contents, for example for strings from resource bundles or aliases to string contents.

src The text containing the characters to replace.
a reference to this ICU 2.4

Definition at line 457 of file unistr.cpp.

References TRUE.

Referenced by DateFormatSymbols::assignArray(), DateFormatSymbols::copyData(), DateFormatSymbols::createZoneStrings(), TimeZone::getEquivalentID(), DateFormatSymbols::getLocalPatternChars(), SimpleDateFormat::matchQuarterString(), SimpleDateFormat::matchString(), and DecimalFormatSymbols::operator=().

  return copyFrom(src, TRUE);

Generated by  Doxygen 1.6.0   Back to index