UDF > WinAPIEx > ShellPath >


_WinAPI_PathCommonPrefix

Compare deux chemins pour d�terminer si ils partagent un pr�fixe commun

#include <WinAPIShPath.au3>
_WinAPI_PathCommonPrefix ( $sPath1, $sPath2 )

Param�tres

$sPath1 Le premier nom de chemin.
$sPath2 Le deuxi�me nom de chemin.

Valeur de retour

Retourne le pr�fixe commun, @extended contiendra le nombre de caract�res communs du pr�fixe dans le chemin.

Voir aussi

Consultez PathCommonPrefix dans la librairie MSDN.

Exemple

#include <WinAPIShPath.au3>

Local $sPath1 = 'C:\Documents\Test.txt'
Local $sPath2 = 'C:\Documents\Archive\Sample.txt'

ConsoleWrite('Path1 : ' & $sPath1 & @CRLF)
ConsoleWrite('Path2 : ' & $sPath2 & @CRLF)
ConsoleWrite('Prefix: ' & _WinAPI_PathCommonPrefix($sPath1, $sPath2) & @CRLF)