1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsCaseConversionImp2.h"
7 #include "nsUnicharUtils.h"
9 NS_IMETHODIMP_(MozExternalRefCountType
) nsCaseConversionImp2::AddRef(void)
11 return (MozExternalRefCountType
)1;
14 NS_IMETHODIMP_(MozExternalRefCountType
) nsCaseConversionImp2::Release(void)
16 return (MozExternalRefCountType
)1;
19 NS_IMPL_QUERY_INTERFACE(nsCaseConversionImp2
, nsICaseConversion
)
21 NS_IMETHODIMP
nsCaseConversionImp2::ToUpper(char16_t aChar
, char16_t
* aReturn
)
23 *aReturn
= ToUpperCase(aChar
);
27 NS_IMETHODIMP
nsCaseConversionImp2::ToLower(char16_t aChar
, char16_t
* aReturn
)
29 *aReturn
= ToLowerCase(aChar
);
33 NS_IMETHODIMP
nsCaseConversionImp2::ToTitle(char16_t aChar
, char16_t
* aReturn
)
35 *aReturn
= ToTitleCase(aChar
);
39 NS_IMETHODIMP
nsCaseConversionImp2::ToUpper(const char16_t
* anArray
,
43 ToUpperCase(anArray
, aReturn
, aLen
);
47 NS_IMETHODIMP
nsCaseConversionImp2::ToLower(const char16_t
* anArray
,
51 ToLowerCase(anArray
, aReturn
, aLen
);
56 nsCaseConversionImp2::CaseInsensitiveCompare(const char16_t
*aLeft
,
57 const char16_t
*aRight
,
58 uint32_t aCount
, int32_t* aResult
)
60 *aResult
= ::CaseInsensitiveCompare(aLeft
, aRight
, aCount
);