Okapi .NET Library

Routines.GetCommonRoot Method 

 [This is preliminary documentation and subject to change.]

Gets the longest common path between an existing folder and a new path.

[Visual Basic]
Shared Public Function GetCommonRoot( _ 
   ByVal p_sNewPath As String, _ 
   ByVal p_sOldRoot As String _ 
) As String
[C#]
public static string GetCommonRoot(
   string p_sNewPath,
   string p_sOldRoot
);
[C++]
public: static String* GetCommonRoot(
   String* p_sNewPath,
   String* p_sOldRoot
);
[JScript]
public static function GetCommonRoot(
   String p_sNewPath,
   String p_sOldRoot
): String;

Parameters

p_sNewPath
The new full path.
p_sOldRoot
The existing root (it can be null or empty).

Return Value

The new common root, or the old root if there is no common root with the new path.

See Also

Routines Class | Okapi.Library.Base Namespace