1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/string/public/nsAString.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,60 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim:set ts=2 sw=2 sts=2 et cindent: */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 +// IWYU pragma: private, include "nsString.h" 1.10 + 1.11 +#ifndef nsAString_h___ 1.12 +#define nsAString_h___ 1.13 + 1.14 +#include "nsStringFwd.h" 1.15 +#include "nsStringIterator.h" 1.16 + 1.17 +#include <string.h> 1.18 +#include <stdarg.h> 1.19 + 1.20 +#include "mozilla/fallible.h" 1.21 + 1.22 +#define kNotFound -1 1.23 + 1.24 + // declare nsAString 1.25 +#include "string-template-def-unichar.h" 1.26 +#include "nsTSubstring.h" 1.27 +#include "string-template-undef.h" 1.28 + 1.29 + // declare nsACString 1.30 +#include "string-template-def-char.h" 1.31 +#include "nsTSubstring.h" 1.32 +#include "string-template-undef.h" 1.33 + 1.34 + 1.35 + /** 1.36 + * ASCII case-insensitive comparator. (for Unicode case-insensitive 1.37 + * comparision, see nsUnicharUtils.h) 1.38 + */ 1.39 +class nsCaseInsensitiveCStringComparator 1.40 + : public nsCStringComparator 1.41 + { 1.42 + public: 1.43 + nsCaseInsensitiveCStringComparator() {} 1.44 + typedef char char_type; 1.45 + 1.46 + virtual int operator()( const char_type*, const char_type*, uint32_t, uint32_t ) const; 1.47 + }; 1.48 + 1.49 +class nsCaseInsensitiveCStringArrayComparator 1.50 + { 1.51 + public: 1.52 + template<class A, class B> 1.53 + bool Equals(const A& a, const B& b) const { 1.54 + return a.Equals(b, nsCaseInsensitiveCStringComparator()); 1.55 + } 1.56 + }; 1.57 + 1.58 + // included here for backwards compatibility 1.59 +#ifndef nsSubstringTuple_h___ 1.60 +#include "nsSubstringTuple.h" 1.61 +#endif 1.62 + 1.63 +#endif // !defined(nsAString_h___)