Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F2718214
utils.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 15, 6:07 PM
Size
815 B
Mime Type
text/x-c
Expires
Tue, Feb 17, 6:07 PM (1 d, 18 h)
Engine
blob
Format
Raw Data
Handle
237762
Attached To
rXR Xreate
utils.cpp
View Options
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* utils.cpp
*
* Author: pgess <v.melnychenko@xreate.org>
*/
/**
* \file utils.h
* \brief Auxiliary code
*/
#include "utils.h"
#include <boost/locale/encoding_utf.hpp>
using namespace xreate;
Config Config::__self = Config();
Config::Config()
: __storage{json_file{ "config/default.json" }}
{}
using boost::locale::conv::utf_to_utf;
std::wstring
utf8_to_wstring(const std::string& str)
{
return utf_to_utf<wchar_t>(str.c_str(), str.c_str() + str.size());
}
std::string
wstring_to_utf8(const std::wstring& str)
{
return utf_to_utf<char>(str.c_str(), str.c_str() + str.size());
}
Event Timeline
Log In to Comment