Imprment string trimr to remove spaces at the end of aircraft name.

(cherry picked from commit 70fd4039938cdd45f03d541e0aff1238de85fb3e)
This commit is contained in:
heurist1 2023-02-28 19:04:03 +00:00
parent 567fee1d98
commit ef151e243b
2 changed files with 9 additions and 0 deletions

View file

@ -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
}