Say you have a path: C:\Users\Test\File.mp3, and want to split the string:
"C:\Users\Test\File.mp3"
at the last slash to
"File.mp3"
Does anyone know how to achieve this in Csound?
Say you have a path: C:\Users\Test\File.mp3, and want to split the string:
"C:\Users\Test\File.mp3"
at the last slash to
"File.mp3"
Does anyone know how to achieve this in Csound?
strsub
is probably the way to do this.
https://csound.com/docs/manual/strsub.html
Although, to know where to split the string you’ll need to work back though it and find the location of the final ‘’. For that you can use strchar:
https://csound.com/docs/manual/strchar.html
Nice! I think I made some elaborate UDO for this a while back and there you go and write an opcode that does it all!