diff options
Diffstat (limited to 'lib-apps-common/inc/I18n/String.h')
-rw-r--r-- | lib-apps-common/inc/I18n/String.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/lib-apps-common/inc/I18n/String.h b/lib-apps-common/inc/I18n/String.h new file mode 100644 index 0000000..4d78002 --- /dev/null +++ b/lib-apps-common/inc/I18n/String.h @@ -0,0 +1,45 @@ +/* + * Copyright 2017 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef I18N_STRING_H +#define I18N_STRING_H + +#include <string> +#include <utils_i18n.h> + +namespace I18n +{ + /** + * @brief String consisting of i18n_uchar. + */ + typedef std::basic_string<i18n_uchar> String; + + /** + * @brief Convert I18n string into UTF-8. + * @param[in] str I18n string + * @return UTF-8 string. + */ + EXPORT_API std::string toUtf8(const String &str); + + /** + * @brief Convert UTF-8 string into I18n. + * @param[in] str UTF-8 string + * @return I18n string. + */ + EXPORT_API String fromUtf8(const std::string &str); +} + +#endif /* I18N_STRING_H */ |