In my application, I am appending a string to create path to generate a URL. Now I want to remove that appended string on pressing back button.
Suppose this is the string:
/String1/String2/String3/String4/String5
Now I want a string like this:
/String1/String2/String3/String4/
How can I do this?
question from:https://stackoverflow.com/questions/10828313/remove-string-after-last-occurrence-of-a-character