Help Center

AfxPathCommonPrefixfunction

Compares two paths to determine if they share a common prefix. A prefix is one of these types: "C:\\", ".", "..", "..\\".

String ManagementfunctionAfxPath.incdocumented

Syntax

FUNCTION AfxPathCommonPrefix (BYREF wszFile1 AS CONST WSTRING, BYREF wszFile2 AS CONST WSTRING) AS DWSTRING

Parameters

NameDescription
wszFile1A string that contains the first path name.
wszFile2A string that contains the second path name.

Return value

The common prefix.

Description

Compares two paths to determine if they share a common prefix. A prefix is one of these types: "C:\\", ".", "..", "..\\".

Example

DIM dws AS DWSTRING = AfxPathCommonPrefix("C:\win\desktop\temp.txt", "c:\win\tray\sample.txt")

Reference

  • Include file AfxPath.inc
  • Defined in AfxNova/AfxPath.inc:219
  • Documented in String Management/Path and Url Procedures.md
  • Topic: Path and Url procedures