28 if( s.find(
' ') == std::string::npos )
35 const std::string null( 1U ,
'\0' ) ;
42 for( G::Strings::iterator p = m_args.begin() ; p != m_args.end() ; ++p )
50 m_exe =
G::Path( m_args.front() ) ;
56 if( m_exe !=
G::Path() && !osNativelyRunnable() )
74 return m_exe.str() + std::string(m_args.size()?1U:0U,
' ') +
G::Str::join( m_args ,
" " ) ;
std::list< std::string > Strings
A std::list of std::strings.
static void splitIntoTokens(const std::string &in, Strings &out, const std::string &ws)
Splits the string into 'ws'-delimited tokens.
Strings args() const
Returns the command-line arguments.
static unsigned int replaceAll(std::string &s, const std::string &from, const std::string &to)
Does a global replace on string 's', replacing all occurences of sub-string 'from' with 'to'...
Executable(const std::string &command_line=std::string())
Constructor taking a complete command-line.
std::string displayString() const
Returns a printable representation for logging and diagnostics.
A Path object represents a file system path.
static std::string join(const Strings &strings, const std::string &sep)
Concatenates a set of strings.
Path exe() const
Returns the executable.