|
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" |
|
7 |
|
8 #ifndef nsAString_h___ |
|
9 #define nsAString_h___ |
|
10 |
|
11 #include "nsStringFwd.h" |
|
12 #include "nsStringIterator.h" |
|
13 |
|
14 #include <string.h> |
|
15 #include <stdarg.h> |
|
16 |
|
17 #include "mozilla/fallible.h" |
|
18 |
|
19 #define kNotFound -1 |
|
20 |
|
21 // declare nsAString |
|
22 #include "string-template-def-unichar.h" |
|
23 #include "nsTSubstring.h" |
|
24 #include "string-template-undef.h" |
|
25 |
|
26 // declare nsACString |
|
27 #include "string-template-def-char.h" |
|
28 #include "nsTSubstring.h" |
|
29 #include "string-template-undef.h" |
|
30 |
|
31 |
|
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; |
|
42 |
|
43 virtual int operator()( const char_type*, const char_type*, uint32_t, uint32_t ) const; |
|
44 }; |
|
45 |
|
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 }; |
|
54 |
|
55 // included here for backwards compatibility |
|
56 #ifndef nsSubstringTuple_h___ |
|
57 #include "nsSubstringTuple.h" |
|
58 #endif |
|
59 |
|
60 #endif // !defined(nsAString_h___) |