| 2291 | } |
| 2292 | } |
| 2293 | String jjRegexReplace(const String& text, const String& expression, const String& replacement, bool ignoreCase) { |
| 2294 | noop(); |
| 2295 | |
| 2296 | try { |
| 2297 | auto flags = std::regex_constants::ECMAScript; |
| 2298 | if (ignoreCase) { |
| 2299 | flags |= std::regex_constants::icase; |
| 2300 | } |
| 2301 | std::regex r(expression.begin(), expression.end(), flags); |
| 2302 | std::string textStr = text; |
| 2303 | std::string replacementStr = replacement; |
| 2304 | return std::regex_replace(textStr, r, replacementStr); |
| 2305 | } catch (std::regex_error& e) { |
| 2306 | LOGE("Failed to process regular expression: {}", e.what()); |
| 2307 | return text; |
| 2308 | } |
| 2309 | } |
| 2310 | |
| 2311 | std::int32_t GetFPS() { |
| 2312 | noop(); |