Code Tips
Get tips for writing code in Shopify Liquid, HTML, CSS and Javascript.
Articles tagged "liquid" | Back to all posts
Remove the last character of a string with Liquid
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...
Remove the last character of a string with Liquid
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...