From: www on
Hi,

I have a String "dirA/dirB/dirC/file.txt". How to use String
manipulation technique to get "file.txt"?

String fullName = "dirA/dirB/dirC/file.txt";

int index = fullName.lastIndexOf("\\"); //here is a problem, if I try
lastIndexOf("\"), there is a compile error

String fileName = fullName.subString(index); //but does not work

Thank you very much.

ps: I am working on linux.