xpcom/string/public/nsAString.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 // IWYU pragma: private, include "nsString.h"
     8 #ifndef nsAString_h___
     9 #define nsAString_h___
    11 #include "nsStringFwd.h"
    12 #include "nsStringIterator.h"
    14 #include <string.h>
    15 #include <stdarg.h>
    17 #include "mozilla/fallible.h"
    19 #define kNotFound -1
    21   // declare nsAString
    22 #include "string-template-def-unichar.h"
    23 #include "nsTSubstring.h"
    24 #include "string-template-undef.h"
    26   // declare nsACString
    27 #include "string-template-def-char.h"
    28 #include "nsTSubstring.h"
    29 #include "string-template-undef.h"
    32   /**
    33    * ASCII case-insensitive comparator.  (for Unicode case-insensitive
    34    * comparision, see nsUnicharUtils.h)
    35    */
    36 class nsCaseInsensitiveCStringComparator
    37     : public nsCStringComparator
    38   {
    39     public:
    40       nsCaseInsensitiveCStringComparator() {}
    41       typedef char char_type;
    43       virtual int operator()( const char_type*, const char_type*, uint32_t, uint32_t ) const;
    44   };
    46 class nsCaseInsensitiveCStringArrayComparator
    47   {
    48     public:
    49       template<class A, class B>
    50       bool Equals(const A& a, const B& b) const {
    51         return a.Equals(b, nsCaseInsensitiveCStringComparator());
    52       }
    53   };
    55   // included here for backwards compatibility
    56 #ifndef nsSubstringTuple_h___
    57 #include "nsSubstringTuple.h"
    58 #endif
    60 #endif // !defined(nsAString_h___)

mercurial