MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / getPrefixAndSuffixForIntFormat

Function getPrefixAndSuffixForIntFormat

pcsx2-qt/Settings/ControllerBindingWidget.cpp:563–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

561ControllerCustomSettingsWidget::~ControllerCustomSettingsWidget() = default;
562
563static std::tuple<QString, QString> getPrefixAndSuffixForIntFormat(const QString& format)
564{
565 QString prefix, suffix;
566 QRegularExpression re(QStringLiteral("(.*)%.*d(.*)"));
567 QRegularExpressionMatch match(re.match(format));
568 if (match.isValid())
569 {
570 prefix = match.captured(1).replace(QStringLiteral("%%"), QStringLiteral("%"));
571 suffix = match.captured(2).replace(QStringLiteral("%%"), QStringLiteral("%"));
572 }
573
574 return std::tie(prefix, suffix);
575}
576
577static std::tuple<QString, QString, int> getPrefixAndSuffixForFloatFormat(const QString& format)
578{

Callers 1

createSettingWidgetsMethod · 0.85

Calls 3

isValidMethod · 0.80
matchMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected