# File lib/rake/application.rb, line 302
302:     def truncate(string, width)
303:       if string.nil?
304:         ""
305:       elsif string.length <= width
306:         string
307:       else
308:         ( string[0, width-3] || "" ) + "..."
309:       end
310:     end