mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 16:07:23 -06:00
@@ -49,6 +49,16 @@ QString Utils::String::fromDouble(const double n, const int precision)
|
||||
return QLocale::system().toString(std::floor(n * prec) / prec, 'f', precision);
|
||||
}
|
||||
|
||||
QString Utils::String::fromLatin1(const std::string &string)
|
||||
{
|
||||
return QString::fromLatin1(string.c_str(), string.size());
|
||||
}
|
||||
|
||||
QString Utils::String::fromLocal8Bit(const std::string &string)
|
||||
{
|
||||
return QString::fromLocal8Bit(string.c_str(), string.size());
|
||||
}
|
||||
|
||||
QString Utils::String::wildcardToRegexPattern(const QString &pattern)
|
||||
{
|
||||
return QRegularExpression::wildcardToRegularExpression(pattern, QRegularExpression::UnanchoredWildcardConversion);
|
||||
|
||||
@@ -66,6 +66,8 @@ namespace Utils::String
|
||||
QStringList splitCommand(const QString &command);
|
||||
|
||||
QString fromDouble(double n, int precision);
|
||||
QString fromLatin1(const std::string &string);
|
||||
QString fromLocal8Bit(const std::string &string);
|
||||
|
||||
template <typename Container>
|
||||
QString joinIntoString(const Container &container, const QString &separator)
|
||||
|
||||
Reference in New Issue
Block a user