#include"script.h" int main( int argc, char **argv ) { bool r = isArg( argv, "+s" ); // if at least one program's argument is '+s' then this is true Str args( "+p abc +w 15 12 \"-s\" 44n /col 4" ); r = isArg( args, "+w", " " ); // true r = isArg( args, "-s", " " ); // false strVector v; getArgStr( argv, "+p", v, "+-/" ); // fill vector v with arguments after '+p' switch but not after other switches for( int i = 0; i < v.size(); i++ ) printf( "%s\n", v[ i ].c_str() ); getArgStr( args, "+w", v, " ", "+-/" ); for( int i = 0; i < v.size(); i++ ) printf( "%s\n", v[ i ].c_str() ); }