2.1.10.24 GetFilenameWithoutExt


Description

Get the path and/or just filename without extension from a string containing a path and/or just filename.

Syntax

string GetFilenameWithoutExt( string strPathAndFilename )

Parameters

strPathAndFilename
[input] string containing an optional path and a filename with filetype extension

Return

Returns a filename without filetype extension (but with path if in original string) from an optional path and filename with extension.

Examples

EX1

int GetFilenameWithoutExt_ex1()
{
    string strFilenameWithoutExt, strFilenameWithExt;
    strFilenameWithExt = "Default.oaf";
    strFilenameWithoutExt = GetFilenameWithoutExt( strFilenameWithExt );
    ASSERT( strFilenameWithoutExt.Compare( "Default" ) == 0 );
    return 0;
}

Remark

See Also

Header to Include

origin.h

Reference