STEM base file name without directory or suffix

s = stem(p) returns the stem (base name) of the file specified by the path p.
leading dot filenames are allowed.

Contents

Inputs:

Output:

Note: fileparts() was about 100x faster then using multiple steps with pattern.