# File lib/icalendar/component.rb, line 128
    def print_properties
      s = ""

      @properties.each do |key,val| 
        # Take out underscore for property names that conflicted
        # with built-in words.
        if key =~ /ip_.*/
          key = key[3..-1]
        end

        # Property name
        prelude = "#{key.gsub(/_/, '-').upcase}" + 

        # Possible parameters
        print_parameters(val) 

        # Property value
        value = ":#{val.to_ical}" 

        escaped = prelude + value.gsub("\\", "\\\\").gsub("\n", "\\n").gsub(",", "\\,").gsub(";", "\\;")
        s << escaped.slice!(0, MAX_LINE_LENGTH) << "\r\n " while escaped.size > MAX_LINE_LENGTH
        s << escaped << "\r\n"
        s.gsub!(/ *$/, '')
      end

      s
    end