#include "stdafx.h" #include "commandline_parser.h" commandline_parser::commandline_parser() { init(pfc::stringcvt::string_utf8_from_os(GetCommandLine())); } void commandline_parser::init(const char * cmd) { pfc::string8_fastalloc temp; pfc::chain_list_v2_t out; while(*cmd) { temp.reset(); while(*cmd && *cmd!=' ') { if (*cmd=='\"') { cmd++; while(*cmd && *cmd!='\"') temp.add_byte(*(cmd++)); if (*cmd == '\"') cmd++; } else temp.add_byte(*(cmd++)); } out.insert_last(temp); while(*cmd==' ') cmd++; } pfc::list_to_array(m_data,out); } size_t commandline_parser::find_param(const char * ptr) const { for(size_t n=1;n