intl/locale/nsUConvPropertySearch.h
author Nicholas Nethercote <nnethercote@mozilla.com>
Fri, 11 Mar 2016 12:58:17 +1100
changeset 288851 87dc4355a517fdd4b4273ed0043195a3c2610efd
parent 196036 b79894a533bcd2c5b742f55e0de9eff40d8b86c3
child 291912 835b1d9e49182f5a91e9dc931c19b836e14085ba
permissions -rw-r--r--
Bug 1255655 - Const-ify k{Unix,Win}Charsets and kLangGroups. r=smontagu.

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef nsUConvPropertySearch_h_
#define nsUConvPropertySearch_h_

#include "nsStringFwd.h"

class nsUConvPropertySearch
{
  public:
    /**
     * Looks up a property by value.
     *
     * @param aProperties
     *   the static property array
     * @param aKey
     *   the key to look up
     * @param aValue
     *   the return value (empty string if not found)
     * @return NS_OK if found or NS_ERROR_FAILURE if not found
     */
    static nsresult SearchPropertyValue(const char* const aProperties[][3],
                                        int32_t aNumberOfProperties,
                                        const nsACString& aKey,
                                        nsACString& aValue);
};

#endif /* nsUConvPropertySearch_h_ */