xref: /haiku/src/system/libroot/add-ons/icu/ICULocaleconvData.cpp (revision dfc8a217db488098641462dfc334dcc0f7d62456)
1 /*
2  * Copyright 2010, 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 
12 namespace BPrivate {
13 
14 
15 status_t
16 ICULocaleconvData::_SetLocaleconvEntry(const DecimalFormatSymbols* formatSymbols,
17 	char* destination, FormatSymbol symbol, const char* defaultValue)
18 {
19 	status_t result = B_OK;
20 
21 	UnicodeString symbolString = formatSymbols->getSymbol(symbol);
22 	if (!symbolString.isEmpty()) {
23 		result = _ConvertUnicodeStringToLocaleconvEntry(symbolString,
24 			destination, skLCBufSize, defaultValue);
25 	} else
26 		destination[0] = '\0';
27 
28 	return result;
29 }
30 
31 
32 }	// namespace BPrivate
33