def diff_modes(before, after)
      before_modes = before.split(//)
      after_modes = after.split(//)
      removed = before_modes - after_modes
      added = after_modes - before_modes
      result = removed.map { |m| '-' + m }.join
      result << added.map { |m| '+' + m }.join
      return condense_modes(result)
    end
def diff_modes(before, after)
      before_modes = before.split(//)
      after_modes = after.split(//)
      removed = before_modes - after_modes
      added = after_modes - before_modes
      result = removed.map { |m| '-' + m }.join
      result << added.map { |m| '+' + m }.join
      return condense_modes(result)
    end
Calculate the difference between two mode strings.
 @param [String] before The "before" mode string.
 @param [String] after The "after" mode string.
 @return [String] A modestring representing the difference between the
   two mode strings.