mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-18 03:14:06 +00:00
27 lines
472 B
C++
27 lines
472 B
C++
#include "wstring_qt.hh"
|
|
#include <QVector>
|
|
|
|
namespace gd
|
|
{
|
|
QString toQString( wstring const & in )
|
|
{
|
|
return QString::fromStdU32String( in );
|
|
}
|
|
|
|
wstring toWString( QString const & in )
|
|
{
|
|
return in.toStdU32String();
|
|
}
|
|
|
|
wstring normalize( const wstring & str )
|
|
{
|
|
return gd::toWString( gd::toQString( str ).normalized( QString::NormalizationForm_C ) );
|
|
}
|
|
|
|
std::string toStdString(const QString& str)
|
|
{
|
|
return str.toStdString();
|
|
}
|
|
|
|
}
|