Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Deprecated/old_18mar_diff/Str14dec/StrAdd.inl

Go to the documentation of this file.
00001 #ifndef __J2K__JString_Add_INL__
00002 #define __J2K__JString_Add_INL__
00003 
00004 #include <j2k/Fred/String/String.hpp>
00005 
00006 // TODO:  Check for effects of LOCK functions !
00007 // JStringAt also !
00008 
00009 /*
00010 Functions defined:
00011 ------------------
00012 CopyBeforeWrite()
00013 
00014 Assign( const char* s )
00015 Add( const char* s1, const char* s2 )
00016 Append( const char* s )
00017 
00018 operator=
00019 operator+
00020 operator+=
00021 */
00022 
00023 inline const JString& JString::operator+=(const char* s) {
00024   ULONG Len = 0;
00025   if ( s != NULL && *s != (char)NULL ) {
00026     Len = strlen( s );
00027   }
00028   Append( s, Len );
00029   return *this;
00030 }
00031 
00032 inline const JString& JString::operator+=(char ch) {
00033   char tmp[2] = { ch, '\0' };
00034   Append( tmp, 1 );
00035   return *this;
00036 }
00037 
00038 inline const JString& JString::operator+=(const JString& S1) {
00039   Append( S1.pData->data, S1.pData->length );
00040   return *this;
00041 }
00042 
00043 inline void JString::Add( const char* s1, const char* s2,
00044                           ULONG Len1,    ULONG Len2 )
00045 {
00046   Add( s1, s2, Len1, Len2, 0 );
00047 }
00048 
00049 #endif

Generated on Sun Oct 14 18:46:27 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001