2022-11-04 01:11:55 +05:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
namespace StringUtils {
|
2022-11-04 01:14:23 +05:30
|
|
|
|
|
|
|
#if defined Q_OS_WIN32
|
|
|
|
inline std::wstring toStdString(QString s)
|
|
|
|
{
|
|
|
|
return s.toStdWString();
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
inline std::string toStdString(QString s)
|
|
|
|
{
|
|
|
|
return s.toStdString();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2022-11-04 01:11:55 +05:30
|
|
|
int naturalCompare(const QString& s1, const QString& s2, Qt::CaseSensitivity cs);
|
|
|
|
} // namespace StringUtils
|