How can I get the filename from a file path in Ruby?

For example if I have a path of "C:\projects\blah.dll" and I just want the “blah”.

Is there a LastIndexOf method in Ruby?

10 Answers
10

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *