---
title: "size"

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

# size


    Returns the size of a string or an array.   
The size of a string is the number of characters included in the string. The size of an array is the number of elements in the array.

    



    
`variable | size()` returns an integer.
    



    
        ## Required params

        
             `variable` `array`, `string`\: The variable to get the size of.
        
    





    
## Example

        
            

            

            

            
<SlineExample path={''} objects={ 
    [""] 
}>
```sline
{{#var arr = "one,two,three" | split(",") /}}

{{ arr | size() }}
```
</SlineExample>
            
        
    
