mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-15 01:45:46 -04:00
Imprment string trimr to remove spaces at the end of aircraft name.
(cherry picked from commit 70fd4039938cdd45f03d541e0aff1238de85fb3e)
This commit is contained in:
parent
567fee1d98
commit
ef151e243b
2 changed files with 9 additions and 0 deletions
|
@ -255,3 +255,9 @@ double get_decimals(double num, int16_t mult, bool round) {
|
|||
if (num > .5) intnum++; //Round up
|
||||
return intnum;
|
||||
}
|
||||
|
||||
std::string trimr(std::string str)
|
||||
{
|
||||
size_t last = str.find_last_not_of(' ');
|
||||
return (last!=std::string::npos) ? str.substr(0, last+1) : ""; // Remove the trailing spaces
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue