mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-02-25 17:11:13 -05:00
Update string_format.cpp (#1184)
This commit is contained in:
parent
0dea488e98
commit
6b0f90c321
@ -286,7 +286,7 @@ static const char* whitespace_str = " \t\r\n";
|
|||||||
std::string trim(std::string_view str) {
|
std::string trim(std::string_view str) {
|
||||||
auto first = str.find_first_not_of(whitespace_str);
|
auto first = str.find_first_not_of(whitespace_str);
|
||||||
auto last = str.find_last_not_of(whitespace_str);
|
auto last = str.find_last_not_of(whitespace_str);
|
||||||
return std::string{str.substr(first, last - first)};
|
return std::string{str.substr(first, last - first + 1)};
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string trimr(std::string_view str) {
|
std::string trimr(std::string_view str) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user