Class String
In: lib/ohcount/helpers.rb
Parent: Object

Methods

abbr  

Public Instance methods

Generic string abbreviation function.

Example:

 "foobar".abbr(5)  => "fo..."

[Source]

# File lib/ohcount/helpers.rb, line 8
        def abbr(len=80)
                size > len ? self[0..(len-3)] + "..." : self
        end

[Validate]