---
title: "split"

doc_type: static
doc_category: static
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/sline/filter/split'
  md: 'https://developer.shopline.com/docs/sline/filter/split.md'
---

# split


    Splits the given string using the specified separator and returns an array of the substrings.

    



    
`str | split(separator)` returns an array of strings.
    



    
        ## Required params

        
            - `str` `string`\: The original string.
        
            - `separator` `string`\: The separator.
        
    





    
## Example

        
            

            

            

            
<SlineExample path={''} objects={ 
    [""] 
}>
```sline
{{#var words = "Festive Cheer Gift Box" | split(" ") /}}

{{#for word in words}}
    word: {{ word }}
{{/for}}

```
</SlineExample>
            
        
    
