Rename prefix to before and suffix to after.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
6255d665af
commit
e7633fe134
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user