I have a string which contains a path and I need to remove the last directory from the string. For example:
I have string which contains following path: /www/htdocs/folder/subfolder
And I need to get rid of /subfolder, so that final string would look like: /www/htdocs/folder
How can I do this?
And the 'subfolder' isn't static, it's chancing value.
Thanks for your help 🙂