Method: PasteHub::Util#stringLimit

Defined in:
lib/pastehub/util.rb

#stringLimit(str, limit) ⇒ Object

Cut string with limit characters



65
66
67
68
69
70
71
# File 'lib/pastehub/util.rb', line 65

def stringLimit( str, limit )
  if limit < str.size()
    str[0...(limit)] + "..."
  else
    str
  end
end