A string manipulation problem :-O..
by Jan Sorensen · in Torque Game Engine · 10/15/2010 (4:38 pm) · 3 replies
Hi here :-).
I have a 'string manipulation problem' and hope for help.
I have a 'String' (local %variable) there contain: 'fps/data/shapes/Sprinter/Sprinter.dts'.
I want to remove all the folder information so my variable only contain 'Sprinter.dts' as a result.
I have try many thing, but it's it teases me :-(.
Hope for help, regards Jan :-).
I have a 'string manipulation problem' and hope for help.
I have a 'String' (local %variable) there contain: 'fps/data/shapes/Sprinter/Sprinter.dts'.
I want to remove all the folder information so my variable only contain 'Sprinter.dts' as a result.
I have try many thing, but it's it teases me :-(.
Hope for help, regards Jan :-).
About the author
My 'little hobby project': http://www.virtuchat.com/
Torque Owner RollerJesus
Dream. Build. Repeat.
function getDtsName(%in) { %words = strreplace(%in, "/", " "); %fileName = getWord(%words, getWordCount(%words) - 1); return %fileName; } getDtsName("fps/data/shapes/Sprinter/Sprinter.dts");Fun!!!