I need a certain part of the string for example I have
folder1/folder2/folder3/folder4
and I don't want folder4
in my new string so it should be like
folder1/folder2/folder3
any help would be appreciated I searched for strtok and strchar but I couldn't figure out how to achieve this