hide trim() from the public interface

* src/misc/escape.cc, src/misc/escape.hh (trim): Move...
* src/priv/trim.cc, src/priv/trim.hh: ... in these new files.
* src/priv/Makefile.am: Add them.
* src/parseaut/scanaut.ll, src/parsetl/scantl.ll: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2015-11-11 11:33:15 +01:00
parent 86abd6c1c0
commit d14f0998e0
7 changed files with 74 additions and 25 deletions

View file

@ -23,10 +23,6 @@
#include "config.h"
#include <sstream>
#include <ostream>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include <cstring>
#include "escape.hh"
@ -133,18 +129,6 @@ namespace spot
return os.str();
}
void
trim(std::string& str)
{
str.erase(std::find_if(str.rbegin(), str.rend(),
std::not1(std::ptr_fun<int, int>
(std::isspace))).base(),
str.end());
str.erase(str.begin(),
std::find_if(str.begin(), str.end(),
std::not1(std::ptr_fun<int, int>(std::isspace))));
}
std::ostream&
quote_shell_string(std::ostream& os, const char* str)
{