VirtualBox

Ignore:
Timestamp:
Dec 4, 2023 5:54:51 PM (15 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160601
Message:

libs/xpcom: Get rid of PL_strcasecmp/PL_strncasecmp and replace with IPRT equivalents, bugref:10545

Location:
trunk/src/libs/xpcom18a4/xpcom/string/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/string/src/nsStringComparator.cpp

    r1 r102458  
    3636 *
    3737 * ***** END LICENSE BLOCK ***** */
     38#include <iprt/string.h>
    3839
    3940#include <ctype.h>
    4041#include "nsAString.h"
    41 #include "plstr.h"
    42 
    4342
    4443  // define nsStringComparator
     
    5655nsCaseInsensitiveCStringComparator::operator()( const char_type* lhs, const char_type* rhs, PRUint32 aLength ) const
    5756  {
    58     PRInt32 result=PRInt32(PL_strncasecmp(lhs, rhs, aLength));
     57    PRInt32 result=PRInt32(RTStrNICmp(lhs, rhs, aLength));
    5958    //Egads. PL_strncasecmp is returning *very* negative numbers.
    6059    //Some folks expect -1,0,1, so let's temper its enthusiasm.
  • trunk/src/libs/xpcom18a4/xpcom/string/src/nsStringObsolete.cpp

    r102345 r102458  
    289289  PRInt32 result=0;
    290290  if(aIgnoreCase)
    291     result=PRInt32(PL_strncasecmp(aStr1, aStr2, aCount));
     291    result=PRInt32(RTStrNICmp(aStr1, aStr2, aCount));
    292292  else
    293293    result=nsCharTraits<char>::compare(aStr1,aStr2,aCount);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette