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
12namespace BPrivate {
13namespace Libroot {
14
15
16ICULocaleconvData::ICULocaleconvData(pthread_key_t tlsKey)
17	: inherited(tlsKey)
18{
19}
20
21
22status_t
23ICULocaleconvData::_SetLocaleconvEntry(const DecimalFormatSymbols* formatSymbols,
24	char* destination, FormatSymbol symbol, const char* defaultValue)
25{
26	status_t result = B_OK;
27
28	UnicodeString symbolString = formatSymbols->getSymbol(symbol);
29	if (!symbolString.isEmpty()) {
30		result = _ConvertUnicodeStringToLocaleconvEntry(symbolString,
31			destination, skLCBufSize, defaultValue);
32	} else
33		destination[0] = '\0';
34
35	return result;
36}
37
38
39}	// namespace Libroot
40}	// namespace BPrivate
41