mirror of
https://github.com/polybar/polybar.git
synced 2026-02-19 03:25:40 +00:00
refactor(clang-format): Apply fixes
This commit is contained in:
@ -81,12 +81,11 @@ namespace string_util {
|
||||
/**
|
||||
* Replace all occurrences with bounded replacement
|
||||
*/
|
||||
string replace_all_bounded(const string& haystack, string needle, string replacement,
|
||||
size_t min, size_t max, size_t start, size_t end) {
|
||||
string replace_all_bounded(
|
||||
const string& haystack, string needle, string replacement, size_t min, size_t max, size_t start, size_t end) {
|
||||
if (max != 0 && replacement.length() > max) {
|
||||
replacement = replacement.erase(max);
|
||||
}
|
||||
else if (min != 0 && replacement.length() < min) {
|
||||
} else if (min != 0 && replacement.length() < min) {
|
||||
replacement.insert(0, min - replacement.length(), ' ');
|
||||
}
|
||||
return replace_all(haystack, needle, replacement, start, end);
|
||||
|
||||
Reference in New Issue
Block a user