Skip to content

Extract file extension

ts
function ExtractExt(fileName: string): string;

This function takes any file name (with or without fully qualified path) and returns the extension only.

Example

ts
{
  res = ExtractExt('/docs/sheets/budget.xlsx');
  // res will be ".xlsx"
}