HasExtension(Path: String): Boolean;
Path - path to search extension.
The HasExtension method returns whether file extension exists in a path.
The method returns True, if a path contains file extension, and False, if it does not.
Sub UserProc;
Var
Path_File, s: String;
Begin
Path_File:="c:\Work\1.txt";
If Path.HasExtension(Path_File) Then
s:="Yes";
Else
s:="No";
End If;
End Sub UserProc;
After executing the example, the "s" variable contains Yes, if file extension is contained in a path.
See also: