dbertoni    00/12/20 20:26:19

  Modified:    c/src/PlatformSupport DOMStringHelper.hpp
  Log:
  Added some new helpers and straightened out a few problems.
  
  Revision  Changes    Path
  1.39      +31 -7     xml-xalan/c/src/PlatformSupport/DOMStringHelper.hpp
  
  Index: DOMStringHelper.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/DOMStringHelper.hpp,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- DOMStringHelper.hpp       2000/12/01 22:13:21     1.38
  +++ DOMStringHelper.hpp       2000/12/21 04:26:18     1.39
  @@ -1907,21 +1907,22 @@
   
   
   /**
  - * Concatenate two strings
  + * Assign one string to another
    * 
    * @param theString         target string
  - * @param theStringToAppend string to add to target
  - * @return string with contents of 'theStringToAppend' added to target string
  + * @param theStringToAppend string to assign
  + * @param theStringToAppendLength length of the string (-1 implies the 
string is null-terminated)
  + * @return a reference to the target string
    */
   inline XalanDOMString&
  -append(
  +assign(
                        XalanDOMString&                 theString,
  -                     const XalanDOMString&   theStringToAppend)
  +                     const XalanDOMString&   theStringToAssign)
   {
   #if defined(XALAN_USE_CUSTOM_STRING) || defined(XALAN_USE_STD_STRING)
  -     theString.append(theStringToAppend);
  +     theString = theStringToAssign;
   #else
  -     theString.appendData(theStringToAppend);
  +     theString = theStringToAssign.clone();
   #endif
   
        return theString;
  @@ -1961,6 +1962,29 @@
        {
                theString = XalanDOMString(theStringToAssign, 
theStringToAssignLength);
        }
  +#endif
  +
  +     return theString;
  +}
  +
  +
  +
  +/**
  + * Concatenate two strings
  + * 
  + * @param theString         target string
  + * @param theStringToAppend string to add to target
  + * @return a reference to the target string
  + */
  +inline XalanDOMString&
  +append(
  +                     XalanDOMString&                 theString,
  +                     const XalanDOMString&   theStringToAppend)
  +{
  +#if defined(XALAN_USE_CUSTOM_STRING) || defined(XALAN_USE_STD_STRING)
  +     theString.append(theStringToAppend);
  +#else
  +     theString = theString + theStringToAppend;
   #endif
   
        return theString;
  
  
  

Reply via email to