1/*
2 * Copyright 2010-2011, Oliver Tappe, zooey@hirschkaefer.de.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7#include "ICULocaleconvData.h"
8
9#include <string.h>
10
11
12U_NAMESPACE_USE
13
14
15namespace BPrivate {
16namespace Libroot {
17
18
19ICULocaleconvData::ICULocaleconvData(pthread_key_t tlsKey)
20	: inherited(tlsKey)
21{
22}
23
24
25status_t
26ICULocaleconvData::_SetLocaleconvEntry(const DecimalFormatSymbols* formatSymbols,
27	char* destination, FormatSymbol symbol, const char* defaultValue)
28{
29	status_t result = B_OK;
30
31	UnicodeString symbolString = formatSymbols->getSymbol(symbol);
32	if (!symbolString.isEmpty()) {
33		result = _ConvertUnicodeStringToLocaleconvEntry(symbolString,
34			destination, skLCBufSize, defaultValue);
35	} else
36		destination[0] = '\0';
37
38	return result;
39}
40
41
42}	// namespace Libroot
43}	// namespace BPrivate
44