| 1778 | /************************************************************************/ |
| 1779 | |
| 1780 | static std::string trim(const std::string &s) { |
| 1781 | const auto first = s.find_first_not_of(' '); |
| 1782 | const auto last = s.find_last_not_of(' '); |
| 1783 | if (first == std::string::npos || last == std::string::npos) { |
| 1784 | return std::string(); |
| 1785 | } |
| 1786 | return s.substr(first, last - first + 1); |
| 1787 | } |
| 1788 | |
| 1789 | /************************************************************************/ |
| 1790 | /* pj_load_ini() */ |