Is there a way to parse a string value, that is, seperating it into different elements via a common seperator, and then take out the last chunk?
To be more specific, I am doing this for a url:
value:
website.com/subdir/subdir/subdir/
I need a function that will split this value by the "/" seperators and strip out the last part (if there is nothing after the last slash, remove the next item):
website.com/subdir/subdir/
Am I making any sense? Can anyone help?
Thanks!