Check to see if specified string is a valid file name, no path is allowed
bool is_str_valid_for_filename( string & strName, bool bAutoCorrect = false )
true if strName is not empty and does not contain illegal characters or have been put right correctly
false if strName contains path or has other invalid characters for filename or can't be put right correctly
EX1
int is_str_valid_for_filename_ex1() { string str = "origin*.ini"; ASSERT(!is_str_valid_for_filename(str)); str = "origin.ini"; ASSERT(is_str_valid_for_filename(str)); str = GetAppPath() + "origin.ini"; ASSERT(str.IsFile()); ASSERT(!is_str_valid_for_filename(str)); str = "abc?ef"; ASSERT(!is_str_valid_for_filename(str)); str = "abcef"; ASSERT(is_str_valid_for_filename(str)); return 0; }
origin.h