Sometimes, when manipulating a string or receiving a string from some variable or function, you want to get rid of the string's last character. There might be a period there, or a slash, or some other remnant of a previous operation. In any case, you want to get rid of that last character.
So how do you do this in Liquid?
You first get the length of the string, then use the slice filter to split it into two parts, where the second part is the last character and the first part is the rest of the string. Then you assign that first part to a variable.
Here's the code: