refactor: move FS's toStdString to StringUtils
This is so that anyone can use it :) Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
353b51f11e
commit
ab6c7244fc
2 changed files with 19 additions and 20 deletions
|
@ -3,5 +3,18 @@
|
|||
#include <QString>
|
||||
|
||||
namespace StringUtils {
|
||||
|
||||
#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
|
||||
|
||||
int naturalCompare(const QString& s1, const QString& s2, Qt::CaseSensitivity cs);
|
||||
} // namespace StringUtils
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue