dbertoni    2002/09/05 00:09:42

  Modified:    c/src/PlatformSupport DOMStringHelper.hpp
  Log:
  New helper overloads.
  
  Revision  Changes    Path
  1.60      +42 -0     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.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- DOMStringHelper.hpp       5 Sep 2002 01:34:38 -0000       1.59
  +++ DOMStringHelper.hpp       5 Sep 2002 07:09:42 -0000       1.60
  @@ -1861,6 +1861,25 @@
    * 
    * @param theLHS first string to compare
    * @param theRHS second string to compare
  + * @param theRHSLength the length of the theRHS
  + * @return true if the contents of both strings are identical
  + */
  +inline bool
  +equals(
  +                     const XalanDOMString&           theLHS,
  +                     const XalanDOMChar*                     theRHS,
  +                     XalanDOMString::size_type       theRHSLength)
  +{
  +     return theRHSLength != length(theLHS) ? false : equals(c_wstr(theLHS), 
theRHSLength, theRHS, theRHSLength);
  +}
  +
  +
  +
  +/**
  + * Compare the contents of two strings for equality
  + * 
  + * @param theLHS first string to compare
  + * @param theRHS second string to compare
    * @return true if the contents of both strings are identical
    */
   inline bool
  @@ -1956,6 +1975,29 @@
                        const XalanDOMChar*                     theLHS,
                        const XalanDOMChar*                     theRHS,
                        XalanDOMString::size_type       theLength);
  +
  +
  +
  +/**
  + * Compare the contents of two strings for equality, without regard for case.
  + * Only the characters a-z and A-Z are considered characters with "case".
  + *
  + * @param theLHS first string to compare
  + * @param theLHSLength the length of the theLHS
  + * @param theRHS second string to compare
  + * @param theRHSLength the length of the theRHS
  + * @return true if both strings are identical
  + */
  +inline bool
  +equalsIgnoreCaseASCII(
  +                     const XalanDOMChar*                     theLHS,
  +                     XalanDOMString::size_type       theLHSLength,
  +                     const XalanDOMChar*                     theRHS,
  +                     XalanDOMString::size_type       theRHSLength)
  +{
  +     return theLHSLength != theRHSLength ? false :
  +             equalsIgnoreCaseASCII(theLHS, theRHS, theLHSLength);
  +}
   
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to