Rename prefix to before and suffix to after.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
tastytea 2021-05-30 14:47:18 +02:00
parent 6255d665af
commit e7633fe134
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 8 additions and 8 deletions

View File

@ -233,19 +233,19 @@ match_context context(const boost::match_results<string::const_iterator> &match,
words -= 1;
}
const std::string prefix_reversed(rbegin_before, pos_before);
string prefix(prefix_reversed.rbegin(), prefix_reversed.rend());
std::string suffix(begin_after, pos_after);
while (is_whitespace(*prefix.begin()))
const std::string before_reversed(rbegin_before, pos_before);
string before(before_reversed.rbegin(), before_reversed.rend());
std::string after(begin_after, pos_after);
while (is_whitespace(*before.begin()))
{
prefix.erase(0, 1);
before.erase(0, 1);
}
while (is_whitespace(*suffix.rbegin()))
while (is_whitespace(*after.rbegin()))
{
suffix.erase(suffix.size() - 1);
after.erase(after.size() - 1);
}
return {prefix, suffix};
return {before, after};
}
string headline(const std::string_view prefix)