HasExtension(Path: String): Boolean;
Path - a 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 does not.
Sub Main;
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 Main;
After executing this example, the s" variable contains Yes if file extension is contained in a path.
See also: