2.1.10.42 okutil_composite_name_from_file_path


Description

construct composite name from full filepath

Syntax

string okutil_composite_name_from_file_path( LPCSTR lpcszFullFilePath, LPCSTR lpcszSubPath = NULL )

Parameters

lpcszFullFilePath
[input] the full path to the file
lpcszSubPath
[input] an optional subpath that will be ignored when creating the composite name. Example "X-Functions". No final backslash character '\\' needed.

Return

Return the composite name with path prefix, optional category and file name "<path> (category) name"

Examples

EX1

void okutil_composite_name_from_file_path_ex1()
{    
    string strFullFilePath=okutil_get_origin_path(ORIGIN_PATH_USER, "X-Functions\Signal Processing") + "Interpolate.OXF";
    // example: strFullFilePath = c:\OriginPro\MyUserFolder\X-Functions\\Signal Processing\Interpolate.OXF"

    string strCompositeName = okutil_composite_name_from_file_path( strFullFilePath, "X-Functions");
    // strCompositeName will be "User: (Signal Processing) Interpolate". "X-Functions" is not part of the composite name.
}

Remark

See Also

Header to Include

origin.h

Reference