Has the converter worked?
You don't explain what did not work.
Have you checked which position `
returns and how many characters from the right that would be?
I tried to explain the basic behaviour of $cutright() in this post for you:
You would have to calculate either how many characters you want to keep and use $left() or how many characters you would have to include if you want to cut off a part of a string from the right.
And if you want to find a variable position in a string and use $cutright() (instead of $left()) then you have to subtract that position from the total length of the string.