Can be used to limit the length of a text by "cutting" in the original text, and then creating a new array containing characters in an interval.
An example - if you want the description of an order line to contain a max of 50 characters, this can be done like so: {{line.description | slice: 0, 50}}
This creates an array pulling the value from index 0 (first character) and the next 50 characters. The first number informs (0) WHERE to start slicing from, the second number (50) informs HOW LONG it should slice or HOW MUCH data to include before slicing.
To use with a workflow.
This is an example of how you can ensure that your address line 1 always will stay within 35 characters and anything exceeding that will be passed on to address line 2. If there is more than 70 characters in the address line, it will not be included on the order or shipment.