basename.icn: Procedures to produce base name of a file

procedure basename:        base name of file

link basename
September 22, 1998; Ralph E. Griswold
Contributor: Charles Shartsis
This file is in the public domain.

This procedure is based on the UNIX basename(1) utility.  It strips off
any path information and removes the specified suffix, if present.

If no suffix is provided, the portion of the name up to the first
"." is returned.

It should work under UNIX, MS-DOS, and the Macintosh.

Source code | Program Library Page | Icon Home Page