o
    .dI                  	   @   s@   d Z ddedededefddZddedededefdd	Zd
S )zText processing utilities....valnumendreturnc                 C   s4   t | }t |}||k r| S | d||   | S )zTruncates a string if it is longer than the specified number of characters.
    Truncated strings will end with `end`, an ellipsis by default.
    N)len)r   r   r   
val_length
end_length r	   I/var/www/Matress/matenv/lib/python3.10/site-packages/liquid/utils/text.pytruncate_chars   s
   r   c                 C   s4   |   }t||k rd|S d|d| | S )zMTruncates a string down to the number of words passed as the first parameter. N)splitr   join)r   r   r   wordsr	   r	   r
   truncate_words   s   
r   N)r   )__doc__strintr   r   r	   r	   r	   r
   <module>   s     