JCL Help:PathCommonPrefix

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Compares two paths for a common prefix.


Pascal

 function PathCommonPrefix(const Path1: string; const Path2: string): Integer;


Parameters

Parameters Description
const Path1: string The first path name
const Path2: string The second path name


Return Value

The number of common prefix characters.


Description

PathCommonPrefix compares the two paths to determine if they have a common prefix. The function returns the number of prefix characters they have in common. For example, if Path1 is 'c:winntsystem32' and Path 2 is 'c:winntsystem' the result will be 9 which equals 'c:winnt'.


About

Unit

JclFileUtils


Donator

Marcel van Brakel


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page