2.1.2.16 is_str_has_path


Description

Test the string to see if it begins with a file path, this function does not care whether the file exists or not.

Syntax

BOOL is_str_has_path( LPCSTR lpFileName )

Parameters

lpFileName
[input] file name string to check

Return

true if lpFilename begins with a file path ; otherwise false

Examples

EX1

void is_str_has_path_ex1()
{
	string strPath =  GetAppPath(1) + "\\OriginC\\system\\junk.txt";
	//The file junk.txt does not exist,but still returns  true
     // for is_str_has_path() does not care the file 's existence
	bool bRet = is_str_has_path(strPath);
	if(bRet)
	printf(" \"%s\" has a file path\n" , strPath);
	else
	printf(" \"%s\"  does not have a file path\n" , strPath);
}

Remark

See Also

Is_str_valid_file_path, IsPath, GetFilePath

Header to Include

origin.h

Reference