gradum-kit - v0.1.0
    Preparing search index...

    Function getFileExtension

    • Function

      getFileExtension

      Parameters

      • Optionalstr: string

        The filename or path to read.

      Returns string

      The extension including its dot (".png"), or an empty string if there is none. Only extensions of one to four characters are recognized.

      Read the extension off a filename or path, leading dot included. Also used to tell a file path from a directory path, since a directory yields an empty string.