Extract file extension: Difference between revisions

Content added Content deleted
(Emacs builtin file-name-extension)
m (Minor grammar correction)
Line 1: Line 1:
{{draft task}}
{{draft task}}


Write a program that takes one string argument representing the path to a file and returns the files extension, or the null string if the file path has no extension. An extension appears after the last period in the file name and consists of one or more letters or numbers.
Write a program that takes one string argument representing the path to a file and returns the file's extension, or the null string if the file path has no extension. An extension appears after the last period in the file name and consists of one or more letters or numbers.


Show here the action of your routine on the following examples:
Show here the action of your routine on the following examples: