def format_string(message,max_characters=80)
      max_characters = 5 if max_characters < 5
      m = message.gsub(/\r\n|\n|\r/m,";")
      return (m[0..max_characters-4] + "...") if m.size > max_characters
      return m
    end
def format_string(message,max_characters=80)
      max_characters = 5 if max_characters < 5
      m = message.gsub(/\r\n|\n|\r/m,";")
      return (m[0..max_characters-4] + "...") if m.size > max_characters
      return m
    end
replaces CR, LF, CRLF with ";" and cut's string to requied length by adding "..." if string would be longer