intl/unicharutil/public/nsICaseConversion.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/unicharutil/public/nsICaseConversion.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,45 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +#ifndef nsICaseConversion_h__
     1.9 +#define nsICaseConversion_h__
    1.10 +
    1.11 +
    1.12 +#include "nsISupports.h"
    1.13 +#include "nscore.h"
    1.14 +
    1.15 +// {07D3D8E0-9614-11d2-B3AD-00805F8A6670}
    1.16 +#define NS_ICASECONVERSION_IID \
    1.17 +{ 0x7d3d8e0, 0x9614, 0x11d2, \
    1.18 +    { 0xb3, 0xad, 0x0, 0x80, 0x5f, 0x8a, 0x66, 0x70 } }
    1.19 +
    1.20 +class nsICaseConversion : public nsISupports {
    1.21 +
    1.22 +public: 
    1.23 +
    1.24 +  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICASECONVERSION_IID)
    1.25 +
    1.26 +  // Convert one Unicode character into upper case
    1.27 +  NS_IMETHOD ToUpper( char16_t aChar, char16_t* aReturn) = 0;
    1.28 +
    1.29 +  // Convert one Unicode character into lower case
    1.30 +  NS_IMETHOD ToLower( char16_t aChar, char16_t* aReturn) = 0;
    1.31 +
    1.32 +  // Convert one Unicode character into title case
    1.33 +  NS_IMETHOD ToTitle( char16_t aChar, char16_t* aReturn) = 0;
    1.34 +
    1.35 +  // Convert an array of Unicode characters into upper case
    1.36 +  NS_IMETHOD ToUpper( const char16_t* anArray, char16_t* aReturn, uint32_t aLen) = 0;
    1.37 +
    1.38 +  // Convert an array of Unicode characters into lower case
    1.39 +  NS_IMETHOD ToLower( const char16_t* anArray, char16_t* aReturn, uint32_t aLen) = 0;
    1.40 +
    1.41 +  // case-insensitive char16_t* comparison - aResult returns similar
    1.42 +  // to strcasecmp
    1.43 +  NS_IMETHOD CaseInsensitiveCompare(const char16_t* aLeft, const char16_t* aRight, uint32_t aLength, int32_t* aResult) = 0;
    1.44 +};
    1.45 +
    1.46 +NS_DEFINE_STATIC_IID_ACCESSOR(nsICaseConversion, NS_ICASECONVERSION_IID)
    1.47 +
    1.48 +#endif  /* nsICaseConversion_h__ */

mercurial