1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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"
11 #include "nsStringFwd.h"
12 #include "nsStringIterator.h"
17 #include "mozilla/fallible.h"
22 #include "string-template-def-unichar.h"
23 #include "nsTSubstring.h"
24 #include "string-template-undef.h"
27 #include "string-template-def-char.h"
28 #include "nsTSubstring.h"
29 #include "string-template-undef.h"
33 * ASCII case-insensitive comparator. (for Unicode case-insensitive
34 * comparision, see nsUnicharUtils.h)
36 class nsCaseInsensitiveCStringComparator
37 : public nsCStringComparator
40 nsCaseInsensitiveCStringComparator()
43 typedef char char_type
;
45 virtual int operator()(const char_type
*, const char_type
*,
46 uint32_t, uint32_t) const;
49 class nsCaseInsensitiveCStringArrayComparator
52 template<class A
, class B
>
53 bool Equals(const A
& aStrA
, const B
& aStrB
) const
55 return aStrA
.Equals(aStrB
, nsCaseInsensitiveCStringComparator());
59 // included here for backwards compatibility
60 #ifndef nsSubstringTuple_h___
61 #include "nsSubstringTuple.h"
64 #endif // !defined(nsAString_h___)