Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.
PrevUpHomeNext

Function split_unix

boost::program_options::split_unix

Synopsis

// In header: <boost/program_options/parsers.hpp>


BOOST_PROGRAM_OPTIONS_DECL std::vector< std::string > 
split_unix(const std::string & cmdline, const std::string & seperator = " \t", 
           const std::string & quote = "'\"", 
           const std::string & escape = "\\");
BOOST_PROGRAM_OPTIONS_DECL std::vector< std::wstring > 
split_unix(const std::wstring & cmdline, 
           const std::wstring & seperator = L" \t", 
           const std::wstring & quote = L"'\"", 
           const std::wstring & escape = L"\\");

Description

Splits a given string to a collection of single strings which can be passed to command_line_parser. The second parameter is used to specify a collection of possible seperator chars used for splitting. The seperator is defaulted to space " ". Splitting is done in a unix style way, with respect to quotes '"' and escape characters '\'


PrevUpHomeNext