powered by
Removes the last suffix (including the last dot) from a filename. If no dot exists, the full string is returned.
removeSuffix(filepath)
The input with removed suffix
A filename (with optional path -- which is retained!)
removeSuffix("test.tar.gz") # --> 'test.tar' removeSuffix("test.mzML") # --> 'test' removeSuffix("/path/to/test.mzML") # --> '/path/to/test' removeSuffix("test_no_dot") # --> 'test_no_dot'
Run the code above in your browser using DataLab