lib/liquid/standardfilters.rb
# Truncate a string down to x characters
Truncate a string down to x characters
Truncate a string down to x characters
def truncate(input, characters = 100)    
      if input.to_s.size > characters.to_i
        input.to_s[0..characters.to_i] + '&hellip;'
      else
        input
      end
    end
def truncate ( input , characters = 100 ) if input . to_s . size > characters . to_i input . to_s [ 0 .. characters . to_i ] + '&hellip;' else input end end
Truncate a string down to x characters
Truncate a string down to x characters
input
<not_specific>
characters
<not_specific>