Get last 3 letters in a variable
This is an open discussion with 2 replies, filed under General.
Search
There is the ends-with
Xpath 2 function. But it’s probably not available in your system. If not you can do something like substring(image/filename, string-length(image/filename) - 2)
to test for the last three characters.
Cheers. I’ve managed to achieve what I needed!
Create an account or sign in to comment.
Is there a way I can get the last 3 letters of a value into a variable to see if it equals something?
I’m trying to test if a value has .jpg at the end of it in an if/when statement. I’m sure this should be possible in XSLT!
Cheers!