CLocaleManager: add casted version of getText() function

Allows easier handling with strings instead const char
for usage as string source. Separate casts are not requiered.

Overload of getText() was not possible but,
name getTextAsString() is keeping namespace of base function
getText().


Origin commit data
------------------
Commit: 6aa66b84c1
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-07-03 (Mon, 03 Jul 2017)

Origin message was:
------------------
CLocaleManager: add casted version of getText() function

Allows easier handling with strings instead const char
for usage as string source. Separate casts are not requiered.

Overload of getText() was not possible but,
name getTextAsString() is keeping namespace of base function
getText().
This commit is contained in:
2017-07-03 10:50:20 +02:00
parent dac472f809
commit e9fbf6c816

View File

@@ -69,6 +69,7 @@ class CLocaleManager
loadLocale_ret_t loadLocale(const char * const locale, bool asdefault = false);
const char * getText(const neutrino_locale_t keyName) const;
std::string getTextAsString(const neutrino_locale_t keyName) const {return (static_cast<std::string>(getText(keyName)));}
static neutrino_locale_t getMonth (const struct tm * struct_tm_p);
static neutrino_locale_t getMonth (const int mon);