I have a directory that looks something like this:
C:UsersmeProjects
In my application, I append to that path a given project name:
C:UsersmeProjectsmyProject
After, I want to be able to pass that into a method. Inside this method I would also like to use the project name. What is the best way to parse the path string to get the last folder name?
I know a work-around would be to pass the path and the project name into the function, but I was hoping I could limit it to one parameter.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…