# File lib/action_view/helpers/text_helper.rb, line 154
      def excerpt(text, phrase, *args)
        return unless text && phrase

        options = args.extract_options!
        unless args.empty?
          options[:radius] = args[0] || 100
          options[:omission] = args[1] || "..."
        end
        options.reverse_merge!(:radius => 100, :omission => "...")

        phrase = Regexp.escape(phrase)
        return unless found_pos = text.mb_chars =~ /(#{phrase})/i

        start_pos = [ found_pos - options[:radius], 0 ].max
        end_pos   = [ [ found_pos + phrase.mb_chars.length + options[:radius] - 1, 0].max, text.mb_chars.length ].min

        prefix  = start_pos > 0 ? options[:omission] : ""
        postfix = end_pos < text.mb_chars.length - 1 ? options[:omission] : ""

        prefix + text.mb_chars[start_pos..end_pos].strip + postfix
      end