liquid icon indicating copy to clipboard operation
liquid copied to clipboard

Question - Appending whitespaces intentionally

Open GFPhillips opened this issue 4 years ago • 0 comments

Hi All,

is there a way to append whitespaces? I am trying to append whitespaces to a string if its length is not greater than "7".

Example:

myString = "Test12"

{{ myString | append: ' ' | slice: 0,7 }}

Expected output: "Test12 "

Actual output: "Test12"

Thanks

GFPhillips avatar Oct 19 '21 03:10 GFPhillips