Function removeFileExtension

  • Removes the file extension from a string and treats multiple dots in a row as part of the file name.

    Parameters

    • str: string

    Returns string

    removeFileExtension('foo.txt') // 'foo'