Path.extensionSpan

scoped constof(path) char[] extensionSpan(const char[] path)

Returns a view of the extension of the final file-name segment in path.

Remarks

Leading dots alone do not create an extension: .bashrc and ....jpg return an empty span, while .profile.old returns .old.

Returns

The extension including the leading ., or an empty span when the final segment has no extension.

Parameters

const char[]
path

Generated with campc v0.8.0-preview.1+4df4cd2858d46c717d136ff5c571742dc449f642.